Skip to content

Commit 5aeda62

Browse files
committed
Add Azure Trusted Signing in actions
1 parent e65fda1 commit 5aeda62

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ jobs:
66
build:
77

88
runs-on: windows-latest
9+
10+
permissions:
11+
id-token: write
12+
contents: read
13+
914
strategy:
1015
matrix:
1116
build_platform: [x64, Win32, ARM64]
@@ -29,6 +34,26 @@ jobs:
2934
run: |
3035
msbuild NppShell.sln /m /p:configuration="Release" /p:platform="${{ matrix.build_platform }}"
3136
37+
- name: Azure CLI login with federated credential
38+
uses: azure/login@v2
39+
with:
40+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
41+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
42+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
43+
44+
- name: Install sign cli
45+
run: dotnet tool install --global sign --prerelease
46+
47+
- name: Sign executables and libraries
48+
run: sign code trusted-signing `
49+
--trusted-signing-account ${{ secrets.TRUSTED_SIGNING_ACCOUNT_NAME }} `
50+
--trusted-signing-certificate-profile ${{ secrets.TRUSTED_SIGNING_CERTIFICATE_PROFILE }} `
51+
--trusted-signing-endpoint https://weu.codesigning.azure.net `
52+
--azure-credential-type azure-cli `
53+
--verbosity information `
54+
**/*.dll **/*.msix
55+
56+
3257
- name: Archive artifacts for win32
3358
if: matrix.build_platform == 'Win32'
3459
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)