Deploy NuGet Packages #13
Workflow file for this run
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: Deploy NuGet Packages | |
on: | |
workflow_dispatch: # manually trigger the workflow | |
label: # run workflow when label/tag is created | |
types: | |
- created | |
jobs: | |
deploy: | |
name: π Publish Packages | |
runs-on: windows-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
- name: β¨ Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: π οΈ Setup NuGet | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-api-key: ${{ secrets.NUGET_API_KEY }} | |
- name: π Publish DbcParserLib | |
run: | | |
dotnet restore DbcParserLib/DbcParserLib.csproj | |
dotnet build DbcParserLib/DbcParserLib.csproj --configuration Release | |
dotnet pack DbcParserLib/DbcParserLib.csproj --configuration Release | |
nuget push "DbcParserLib\bin\Release\*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json | |
- name: πΎ Store Packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DbcParserLib-Packages | |
retention-days: 3 | |
path: | | |
DbcParserLib/bin/Release/*.nupkg | |
DbcParserLib/bin/Release/*.snupkg |