Created
October 25, 2019 14:10
-
-
Save TheTrigger/43c02bd962104efb5027f1fbca4803ae to your computer and use it in GitHub Desktop.
GitHib Actions publish to NuGet.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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