Skip to content

Merge pull request #19 from pieces-app/feat/clear-ltm #7

Merge pull request #19 from pieces-app/feat/clear-ltm

Merge pull request #19 from pieces-app/feat/clear-ltm #7

name: Release
on:
push:
tags:
- 'client-*'
jobs:
publish-client-to-nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up .NET 8
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
# Build the main client nuget package
- name: Build Client
working-directory: ./src/Client
run: dotnet build -c Release -p:Version=${GITHUB_REF#refs/tags/client-v}
# Download the nuget signing certificate to a local file from the Actions secret
- name: Get the nuget signing certificate
id: cert_file
uses: timheuer/[email protected]
with:
fileName: 'certfile.pfx'
encodedString: ${{ secrets.NUGET_CERTIFICATE }}
# Sign the Client nuget package with the certificate from the Actions secret
- name: Sign the Client nuget package
working-directory: ./src/Client
run: dotnet nuget sign ./bin/Release/Pieces.OS.Client.${GITHUB_REF#refs/tags/client-v}.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.NUGET_CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com
# Push the client nuget package to nuget
- name: Push the Client package to NuGet
working-directory: ./src/Client
run: dotnet nuget push ./bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org