Skip to content

Instantly share code, notes, and snippets.

@skolima
Last active March 20, 2020 16:11
Show Gist options
  • Save skolima/7a2b458552af834474a1afce2e06ba10 to your computer and use it in GitHub Desktop.
Save skolima/7a2b458552af834474a1afce2e06ba10 to your computer and use it in GitHub Desktop.
Build and publish NuGet package to GitHub Package Registry
name: Build and publish NuGet package to GPR
on: [push]
jobs:
nuget-publish:
name: Publish package to GPR
runs-on: ubuntu-latest
steps:
- uses: einaregilsson/build-number@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
source-url: https://nuget.pkg.github.com/YOUR_ORGANIZATION/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: dotnet pack --configuration Release /p:Version=1.1.0.$BUILD_NUMBER --output $GITHUB_WORKSPACE
- run: dotnet nuget push $GITHUB_WORKSPACE/*.nupkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment