Publish Saucery to NuGet #19
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: Publish Saucery to NuGet | |
on: | |
workflow_dispatch: | |
env: | |
PROJECT_NAME: Saucery | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
CONFIG: Release | |
NUPKG_DIR: out | |
NUGET_SOURCE: https://api.nuget.org/v3/index.json | |
jobs: | |
publish: | |
name: build, pack & push Saucery | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
# Check for latest at link at .NET 8 download page (https://dotnet.microsoft.com/download/dotnet/8.0) | |
dotnet-version: 8.0.x | |
#dotnet-version: | | |
# 3.1.x | |
# 5.0.x | |
- name: Compile solution | |
run: dotnet build -c ${{ env.CONFIG }} | |
- name: Pack NuGet package | |
run: dotnet pack -c ${{ env.CONFIG }} ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj -o ${{ env.NUPKG_DIR }} | |
- name: Push generated package to NuGet | |
run: dotnet nuget push ${{ env.NUPKG_DIR }}/*.nupkg --source '${{ env.NUGET_SOURCE }}' --api-key ${{ env.NUGET_API_KEY }} |