Merge pull request #5 from pieces-app/nuget-tweaks #2
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish-to-nuget: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.* | |
- name: Build | |
working-directory: ./src/Client | |
run: dotnet build -c Release -p:Version=${GITHUB_REF#refs/tags/v} | |
- name: Get the nuget signing certificate | |
id: cert_file | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'certfile.pfx' | |
encodedString: ${{ secrets.NUGET_CERTIFICATE }} | |
- name: Sign the nuget package | |
working-directory: ./src/Client | |
run: dotnet nuget sign ./bin/Release/Pieces.OS.Client.${GITHUB_REF#refs/tags/v}.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.NUGET_CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com | |
- name: Push to NuGet | |
working-directory: ./src/Client | |
run: dotnet nuget push ./bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org | |