Skip to content

Instantly share code, notes, and snippets.

@phsantiago32
Created July 18, 2017 01:08
Show Gist options
  • Save phsantiago32/cdb2916fff7f532836077b3486c2b9dd to your computer and use it in GitHub Desktop.
Save phsantiago32/cdb2916fff7f532836077b3486c2b9dd to your computer and use it in GitHub Desktop.
Basic .yml template for publishing .NET Core NuGet packages using AppVeyor
os: Visual Studio 2017
version: 1.0.{build}
branches:
only:
- master
configuration:
- Release
before_build:
- dotnet restore
build:
project: {YOUR_SOLUTION_NAME}.sln
after_build:
- ps: >-
$BuildVersion = (Get-ChildItem Env:APPVEYOR_BUILD_VERSION).value
dotnet pack {YOUR_PROJECT_FOLDER}/{YOUR_PROJECT_NAME}.csproj -c Release /p:Version=$BuildVersion
artifacts:
- path: {YOUR_PROJECT_FOLDER}\bin\Release\netstandard1.6\{YOUR_PROJECT_NAME}.dll
name: {YOUR_PROJECT_NAME}.dll
- path: {YOUR_PROJECT_FOLDER}\bin\Release\*.nupkg
deploy:
provider: NuGet
server: {YOUR_NUGET_SERVER}
api_key:
secure: {YOUR_NUGET_SERVER_KEY}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment