Skip to content

Commit 038d619

Browse files
committed
Rework nuget packages signing to use Azure Trusted Signing service
1 parent 0a9cee9 commit 038d619

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545
path: ~/.dotnet/tools
4646
key: dotnettools
4747

48-
- name: Setup AzureSignTool
48+
- name: Setup dotnet sign tool
4949
if: steps.cache-dotnettools.outputs.cache-hit != 'true'
50-
run: dotnet tool install --verbosity minimal --global azuresigntool --version 6.0.1
50+
run: dotnet tool install --verbosity minimal --global sign --version 0.9.1-beta.24529.1
5151

52-
- name: Setup NuGetKeyVaultSignTool
52+
- name: Setup Knapcode.CertificateExtractor tool
5353
if: steps.cache-dotnettools.outputs.cache-hit != 'true'
54-
run: dotnet tool install --verbosity minimal --global NuGetKeyVaultSignTool --version 3.2.3
54+
run: dotnet tool install --verbosity minimal --global Knapcode.CertificateExtractor --version 0.1.1
5555

5656
- name: Cache packages
5757
uses: actions/cache@v4
@@ -99,36 +99,36 @@ jobs:
9999
path: '${{ github.workspace }}\Source\ClientApplication\bin\${{ matrix.configuration }}'
100100

101101
- name: Pack NetOffice
102-
if: steps.build.outputs.publish_nuget == 'true'
103102
run: |
104103
dotnet pack --no-build --no-restore Source\NetOffice.sln -c ${{ matrix.configuration }} -o dist
105104
env:
106105
VersionSuffix: ${{ steps.build.outputs.app_version_suffix }}
107106

108-
# - name: Sign NetOffice packages
109-
# if: success() && steps.build.outputs.publish_nuget == 'true' && steps.build.outputs.sign_binaries == 'true'
110-
# working-directory: '${{ github.workspace}}\dist'
111-
# run: |
112-
# NuGetKeyVaultSignTool.exe sign *.nupkg `
113-
# --file-digest sha256 `
114-
# --timestamp-rfc3161 http://timestamp.digicert.com `
115-
# --timestamp-digest sha256 `
116-
# --azure-key-vault-url https://opensourcesigning.vault.azure.net `
117-
# --azure-key-vault-tenant-id "${{ secrets.KEYVAULT_TENANT_ID }}" `
118-
# --azure-key-vault-client-id "${{ secrets.KEYVAULT_CLIENT_ID }}" `
119-
# --azure-key-vault-client-secret "${{ secrets.KEYVAULT_CLIENT_SECRET }}" `
120-
# --azure-key-vault-certificate "goITSolutions-until-2024-01"
107+
- name: Sign NetOffice packages
108+
if: success() && steps.build.outputs.sign_binaries == 'true'
109+
working-directory: '${{ github.workspace}}\dist'
110+
run: |
111+
sign code trusted-signing *.nupkg `
112+
--publisher-name "NetOffice" `
113+
--description "NetOffice" `
114+
--description-url "https://github.com/NetOfficeFw/NetOffice" `
115+
--trusted-signing-endpoint "${{ secrets.TRUSTED_SIGNING_ENDPOINT }}" `
116+
--trusted-signing-account "${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }}" `
117+
--trusted-signing-certificate-profile "${{ secrets.TRUSTED_SIGNING_CERTIFICATE_PROFILE }}" `
118+
--file-digest SHA256 `
119+
--timestamp-rfc3161 http://timestamp.acs.microsoft.com `
120+
--timestamp-digest SHA256
121121
122122
- name: Publish packages
123-
if: success() && steps.build.outputs.publish_nuget == 'true'
123+
if: success() && steps.build.outputs.publish_nuget == 'true'
124124
working-directory: '${{ github.workspace}}\dist'
125125
run: |
126126
dotnet nuget push *.nupkg --api-key $env:NUGET_TOKEN --source https://api.nuget.org/v3/index.json
127127
env:
128128
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
129129

130130
- name: Archive NetOffice packages
131-
if: success() && steps.build.outputs.publish_nuget == 'true'
131+
if: success()
132132
uses: actions/upload-artifact@v5
133133
with:
134134
name: NetOffice_packages_v${{ steps.build.outputs.app_version_full }}

0 commit comments

Comments
 (0)