Skip to content

Commit c57938f

Browse files
committed
Add Azure Trusted Signing for the release
1 parent ef605c6 commit c57938f

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ jobs:
88
runs-on: windows-latest
99

1010
permissions:
11-
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
12-
contents: write
11+
id-token: write
12+
contents: read
13+
14+
1315

1416
strategy:
1517
fail-fast: false
@@ -40,6 +42,28 @@ jobs:
4042
working-directory: vcxproj
4143
run: msbuild nppPluginList.vcxproj /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
4244

45+
46+
- name: Azure CLI login with federated credential
47+
uses: azure/login@v2
48+
with:
49+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
50+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
51+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
52+
53+
- name: Install sign cli
54+
run: dotnet tool install --global sign --prerelease
55+
56+
- name: Sign executables and libraries
57+
run: sign code trusted-signing `
58+
--trusted-signing-account ${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }} `
59+
--trusted-signing-certificate-profile ${{ secrets.TRUSTED_SIGNING_CERTIFICATE_PROFILE }} `
60+
--trusted-signing-endpoint https://weu.codesigning.azure.net `
61+
--azure-credential-type azure-cli `
62+
--verbosity information `
63+
**/*.dll
64+
65+
66+
4367
- name: Archive artifacts for x64
4468
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
4569
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)