Version 11.0 #47
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
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Publish NuGet Packages | |
steps: | |
# Checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Setup .NET Core | |
- name: Setup .NET Core @ Latest | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
source-url: https://api.nuget.org/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.NugetAuthToken}} | |
# Setup Nuget | |
- name: Setup Nuget 5.x | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: '5.x' | |
# Build and pack | |
- name: Build solution and generate NuGet package | |
run: ./pack.sh | |
# Install SignClient | |
- name: Install SignClient | |
run: dotnet tool install --tool-path . SignClient | |
# Sign packages | |
- name: Sign packages | |
run: ./SignClient "SIGN" --input "artifacts/*.nupkg" --config "sign.json" --user "${{secrets.SignClientUser}}" --secret "${{secrets.SignClientSecret}}" --name "Piranha.Templates" --description "Piranha.Templates" --descriptionUrl "https://github.com/piranhacms/piranha.core.templates" | |
# Push to NuGet | |
- name: Push generated package to GitHub registry | |
run: dotnet nuget push '**/Piranha*.nupkg' --skip-duplicate -k ${{ secrets.NugetAuthToken }} |