-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.31 KB
/
release.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
45
46
47
48
name: Release
on:
workflow_dispatch:
release:
types: [ "published" ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Pack
run: ./build.sh pack
shell: bash
- name: Sign Nuget package
env:
NUGET_SIGNING_PFX: ${{ secrets.NUGET_SIGNING_PFX }}
NUGET_ROOT_SIGNING_CERT: ${{ secrets.NUGET_ROOT_SIGNING_CERT }}
run: |
sudo mkdir -p /etc/pki/ca-trust/extracted/pem/
echo "$NUGET_ROOT_SIGNING_CERT" | sudo tee -a /etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem > /dev/null
echo "$NUGET_SIGNING_PFX" | openssl base64 -d -out private.pfx
dotnet nuget sign nuget/*.nupkg --certificate-path private.pfx --timestamper http://timestamp.sectigo.com
shell: bash
- name: Publish NuGet package
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push nuget/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: LinguaNugetPkg
path: nuget