Merge pull request #19 from DolbyIO/dev/fabien #54
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: Build NuGet Package | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build-nuget-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.x' | |
- name: Build the solution 🔨 | |
run: dotnet build | |
- name: Create NuGet package 🌎 | |
run: dotnet pack DolbyIO.Rest/DolbyIO.Rest.csproj -p:Configuration=Release | |
- name: Sign NuGet Package | |
working-directory: DolbyIO.Rest/bin/Release | |
run: | | |
echo "${{ secrets.WINDOWS_CERTIFICATE }}" | base64 --decode > certificate.pfx | |
dotnet nuget sign DolbyIO.Rest.*.nupkg --certificate-path ./certificate.pfx --certificate-password ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD}} --timestamper http://timestamp.digicert.com/ | |
rm certificate.pfx | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nuget-package | |
path: DolbyIO.Rest/bin/Release |