-
-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (36 loc) · 1.28 KB
/
publish_to_nuget.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}