Skip to content

Commit 078ef12

Browse files
authored
Merge pull request #11 from NetOfficeFw/release_script
2 parents baeb86b + 8465edf commit 078ef12

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
runs-on: windows-2022
11+
12+
env:
13+
Configuration: 'Release'
14+
VersionSuffix: ''
15+
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: setup dotnet
23+
uses: actions/setup-dotnet@v3
24+
with:
25+
dotnet-version: 6
26+
27+
- name: setup msbuild
28+
uses: microsoft/setup-msbuild@v1
29+
30+
- name: setup NuGetKeyVaultSignTool
31+
run: dotnet tool install --verbosity minimal --global NuGetKeyVaultSignTool --version 3.2.3
32+
33+
- name: build
34+
run: dotnet build -c ${{ env.Configuration }}
35+
36+
- name: pack
37+
run: dotnet pack --no-build --no-restore src/NetOfficeFw.Build.csproj -c ${{ env.Configuration }} -o dist
38+
39+
- name: sign package
40+
run: |
41+
NuGetKeyVaultSignTool.exe sign *.nupkg `
42+
--file-digest sha256 `
43+
--timestamp-rfc3161 http://timestamp.digicert.com `
44+
--timestamp-digest sha256 `
45+
--azure-key-vault-url https://opensourcesigning.vault.azure.net `
46+
--azure-key-vault-tenant-id "${{ secrets.KEYVAULT_TENANT_ID }}" `
47+
--azure-key-vault-client-id "${{ secrets.KEYVAULT_CLIENT_ID }}" `
48+
--azure-key-vault-client-secret "${{ secrets.KEYVAULT_CLIENT_SECRET }}" `
49+
--azure-key-vault-certificate "goITSolutions-until-2024-01"
50+
working-directory: '${{ github.workspace}}\dist'
51+
52+
- name: publish package
53+
if: success()
54+
run: dotnet nuget push *.nupkg --api-key $env:NUGET_TOKEN --source https://api.nuget.org/v3/index.json
55+
working-directory: '${{ github.workspace}}\dist'
56+
env:
57+
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

0 commit comments

Comments
 (0)