Publish nuget packages #6
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 nuget packages | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.x.x | |
- name: Build | |
run: dotnet build JustCRC32C/JustCRC32C.csproj -c Release | |
- name: Pack | |
run: dotnet pack JustCRC32C/JustCRC32C.csproj -c Release | |
- name: Prep packages | |
run: dotnet nuget add source --username bartimaeusnek --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/bartimaeusnek/index.json" | |
- name: Publish to GitHub packages | |
run: dotnet nuget push JustCRC32C/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" | |
- name: Publish to nuget | |
run: dotnet nuget push JustCRC32C/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source 'https://api.nuget.org/v3/index.json' |