Skip to content

Commit cd5f73d

Browse files
committed
Use azure-cli for signing authentication
The previous method was deprecated by Azure.
1 parent c258b72 commit cd5f73d

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install sign tool
4242
if: ${{ env.SignBuild == 'true' }}
4343
shell: cmd
44-
run: dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.24170.3
44+
run: dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.26102.1
4545

4646
- name: Configure automated logging and crash dumps
4747
shell: cmd
@@ -55,23 +55,22 @@ jobs:
5555
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f
5656
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1
5757
58-
# - name: 'Az CLI login'
59-
# if: ${{ env.SignBuild == 'true' }}
60-
# uses: azure/login@v1
61-
# with:
62-
# allow-no-subscriptions: true
63-
# client-id: ${{ secrets.WIX_SIGNING_CLIENTID }}
64-
# tenant-id: ${{ secrets.WIX_SIGNING_TENANTID }}
58+
- name: 'Az CLI login'
59+
if: ${{ env.SignBuild == 'true' }}
60+
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # tag: v2.3.0
61+
with:
62+
allow-no-subscriptions: true
63+
client-id: ${{ secrets.WIX_SIGNING_CLIENTID }}
64+
tenant-id: ${{ secrets.WIX_SIGNING_TENANTID }}
6565

6666
- name: Build wix7
6767
shell: cmd
6868
run: ./src/build_official.cmd
6969
env:
7070
RuntimeTestsEnabled: true
71+
AZURE_CLIENT_ID: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_CLIENTID || '' }}
72+
AZURE_TENANT_ID: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_TENANTID || '' }}
7173
SigningKeyVaultUri: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_VAULTURI || '' }}
72-
SigningTenantId: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_TENANTID || '' }}
73-
SigningClientId: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_CLIENTID || '' }}
74-
SigningClientSecret: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_SECRET || '' }}
7574
SigningCertName: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_CERTNAME || '' }}
7675

7776
- name: Validate test results

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<SigningToolExe>$(ToolsFolder)\sign.exe</SigningToolExe>
77
<SigningCommand>code azure-key-vault</SigningCommand>
8-
<SigningConfiguration>--description "WiX Toolset" --description-url "https://wixtoolset.org/" --recurse-containers=false --azure-key-vault-url $(SigningKeyVaultUri) --azure-key-vault-tenant-id $(SigningTenantId) --azure-key-vault-client-id $(SigningClientId) --azure-key-vault-client-secret $(SigningClientSecret) --azure-key-vault-certificate $(SigningCertName) --timestamp-url "http://timestamp.digicert.com"</SigningConfiguration>
8+
<SigningConfiguration>--publisher-name "WiX Toolset" --description "WiX Toolset" --description-url "https://wixtoolset.org/" --recurse-containers=false --azure-credential-type azure-cli --azure-key-vault-url "$(SigningKeyVaultUri)" --azure-key-vault-certificate "$(SigningCertName)"</SigningConfiguration>
99
</PropertyGroup>
1010

1111
<PropertyGroup Condition=" '$(IsWixTestSupportProject)'=='true' ">

0 commit comments

Comments
 (0)