Publish NuGet Package #3
Workflow file for this run
This file contains hidden or 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: Publish NuGet Package | |
on: | |
push: | |
tags: | |
- 'v*' # Trigger only on version tags like v1.0.0 | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Restore | |
run: dotnet restore Blazor.NavigationStack/Blazor.NavigationStack.csproj | |
- name: Build | |
run: dotnet build Blazor.NavigationStack/Blazor.NavigationStack.csproj --configuration Release --no-restore | |
- name: Pack | |
run: dotnet pack Blazor.NavigationStack/Blazor.NavigationStack.csproj --configuration Release --no-build --output ./nupkg | |
- name: Push to NuGet | |
run: dotnet nuget push "./nupkg/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} |