44 push :
55 branches :
66 - main
7- - master
7+ tags :
8+ - v**
89 pull_request :
910 branches :
1011 - main
2021 build :
2122 name : Build
2223 runs-on : windows-2022
24+ env :
25+ WixOfficialBuild : ${{ github.repository_owner == 'wixtoolset' && startsWith(github.ref, 'refs/tags/v') }}
2326 permissions :
2427 packages : write
2528 id-token : write
3437 # run: ./src/vs_config.cmd
3538
3639 - name : Install sign tool
37- if : (github.ref == 'refs/heads/master')
40+ if : ${{ env.WixOfficialBuild == 'true' }}
3841 shell : cmd
39- run : dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.24529.1
42+ run : dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.24170.3
4043
4144 - name : Configure automated logging and crash dumps
4245 shell : cmd
@@ -50,24 +53,24 @@ jobs:
5053 reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f
5154 reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1
5255
53- - name : ' Az CLI login'
54- if : (github.ref == 'refs/heads/master')
55- uses : azure/login@v1
56- with :
57- allow-no-subscriptions : true
58- client-id : ${{ secrets.WIX_SIGNING_CLIENTID }}
59- tenant-id : ${{ secrets.WIX_SIGNING_TENANTID }}
56+ # - name: 'Az CLI login'
57+ # if: ${{ env.WixOfficialBuild == 'true' }}
58+ # uses: azure/login@v1
59+ # with:
60+ # allow-no-subscriptions: true
61+ # client-id: ${{ secrets.WIX_SIGNING_CLIENTID }}
62+ # tenant-id: ${{ secrets.WIX_SIGNING_TENANTID }}
6063
6164 - name : Build wix6
6265 shell : cmd
6366 run : ./src/build_official.cmd
6467 env :
6568 RuntimeTestsEnabled : true
66- SigningKeyVaultUri : ${{ github.ref == 'refs/heads/master ' && secrets.WIX_SIGNING_VAULTURI || '' }}
67- SigningTenantId : ${{ github.ref == 'refs/heads/master ' && secrets.WIX_SIGNING_TENANTID || '' }}
68- SigningClientId : ${{ github.ref == 'refs/heads/master ' && secrets.WIX_SIGNING_CLIENTID || '' }}
69- SigningClientSecret : ${{ github.ref == 'refs/heads/master ' && secrets.WIX_SIGNING_SECRET || '' }}
70- SigningCertName : ${{ github.ref == 'refs/heads/master ' && secrets.WIX_SIGNING_CERTNAME || '' }}
69+ SigningKeyVaultUri : ${{ env.WixOfficialBuild == 'true ' && secrets.WIX_SIGNING_VAULTURI || '' }}
70+ SigningTenantId : ${{ env.WixOfficialBuild == 'true ' && secrets.WIX_SIGNING_TENANTID || '' }}
71+ SigningClientId : ${{ env.WixOfficialBuild == 'true ' && secrets.WIX_SIGNING_CLIENTID || '' }}
72+ SigningClientSecret : ${{ env.WixOfficialBuild == 'true ' && secrets.WIX_SIGNING_SECRET || '' }}
73+ SigningCertName : ${{ env.WixOfficialBuild == 'true ' && secrets.WIX_SIGNING_CERTNAME || '' }}
7174
7275 - name : Validate test results
7376 shell : cmd
@@ -80,28 +83,28 @@ jobs:
8083 path : build/artifacts/
8184
8285 - name : Collect integration test logs
83- if : always()
86+ if : ${{ !cancelled() }}
8487 shell : cmd
8588 run : 7z a "build\logs\test_burn_%GITHUB_RUN_ID%.zip" "%TEMP%\*.log" "%TEMP%\..\*.log"
8689
8790 - name : Export Application event log
88- if : always()
91+ if : ${{ !cancelled() }}
8992 shell : cmd
9093 run : wevtutil epl Application build\logs\Application.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]"
9194
9295 - name : Export System event log
93- if : always()
96+ if : ${{ !cancelled() }}
9497 shell : cmd
9598 run : wevtutil epl System build\logs\System.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]"
9699
97- # Do NOT publish logs on `master` branch as they may contain secrets in them.
100+ # Do NOT publish logs on `official builds` (version tagged builds) as they may contain secrets in them.
98101 - name : Save logs
99- if : github.ref != 'refs/heads/master ' && always()
102+ if : ${{ env.WixOfficialBuild != 'true ' && !cancelled() }}
100103 uses : actions/upload-artifact@v4
101104 with :
102105 name : logs_${{ github.run_id }}
103106 path : build/logs/
104107
105108 - name : Push to GitHub Packages
106- if : github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master ' || github.ref == 'refs/heads/main')
109+ if : ${{ github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (env.WixOfficialBuild == 'true ' || github.ref == 'refs/heads/main') }}
107110 run : dotnet nuget push "build/artifacts/**/*.nupkg" --source https://nuget.pkg.github.com/wixtoolset/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
0 commit comments