Skip to content

Deploy NuGet Packages #13

Deploy NuGet Packages

Deploy NuGet Packages #13

Workflow file for this run

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