Skip to content

Instantly share code, notes, and snippets.

@TheTrigger
Created October 25, 2019 14:10
Show Gist options
  • Save TheTrigger/43c02bd962104efb5027f1fbca4803ae to your computer and use it in GitHub Desktop.
Save TheTrigger/43c02bd962104efb5027f1fbca4803ae to your computer and use it in GitHub Desktop.
GitHib Actions publish to NuGet.org
name: NuGet Generation
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
name: Update NuGet
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Build solution and generate NuGet package
run: |
cd PROJECT_FOLDER
dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -c Release -o \out
- name: Install NuGet client
uses: warrenbuckley/Setup-Nuget@v1
- name: Set NuGet apiKey
run: nuget setApiKey ${{secrets.NUGET_APIKEY}}
- name: Push generated package to the registry
run: nuget push \out\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment