Build PanelSwWix Toolset v7.1 #433
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build WiX Toolset v6 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| publish_nuget: | |
| description: 'Publish nuget package?' | |
| required: true | |
| default: false | |
| type: boolean | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| NUGET_XMLDOC_MODE: skip | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: windows-2022 | |
| env: | |
| RepoOrg: ${{ github.repository_owner }} | |
| SignBuild: ${{ github.repository_owner == 'wixtoolset' && startsWith(github.ref, 'refs/tags/v') }} | |
| WixOfficialBuild: ${{ github.repository_owner == 'wixtoolset' && startsWith(github.ref, 'refs/tags/v') }} | |
| permissions: | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # - name: Configure Visual Studio | |
| # shell: cmd | |
| # run: ./src/vs_config.cmd | |
| - name: Install sign tool | |
| if: ${{ env.SignBuild == 'true' }} | |
| shell: cmd | |
| run: dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.24170.3 | |
| - name: Configure automated logging and crash dumps | |
| shell: cmd | |
| run: | | |
| reg add HKLM\Software\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f | |
| reg add HKLM\Software\WOW6432Node\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f | |
| reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_EXPAND_SZ /v DumpFolder /d "%CD%\build\logs\crashdumps" /f | |
| reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f | |
| reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1 /f | |
| reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_EXPAND_SZ /v DumpFolder /d "%CD%\build\logs\crashdumps" /f | |
| reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f | |
| reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1 | |
| # - name: 'Az CLI login' | |
| # if: ${{ env.SignBuild == 'true' }} | |
| # uses: azure/login@v1 | |
| # with: | |
| # allow-no-subscriptions: true | |
| # client-id: ${{ secrets.WIX_SIGNING_CLIENTID }} | |
| # tenant-id: ${{ secrets.WIX_SIGNING_TENANTID }} | |
| - name: Decrypt snk | |
| run: gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.GPG_PASSPHRASE }}" --output "${{ github.workspace }}\src\psw-wix.snk" "${{ github.workspace }}\src\psw-wix.snk.gpg" | |
| - name: Build wix6 | |
| shell: cmd | |
| run: ./src/build_official.cmd | |
| env: | |
| RuntimeTestsEnabled: true | |
| SigningKeyVaultUri: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_VAULTURI || '' }} | |
| SigningTenantId: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_TENANTID || '' }} | |
| SigningClientId: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_CLIENTID || '' }} | |
| SigningClientSecret: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_SECRET || '' }} | |
| SigningCertName: ${{ env.SignBuild == 'true' && secrets.WIX_SIGNING_CERTNAME || '' }} | |
| BuildRunNumber: ${{ github.run_number }} | |
| - name: Resolve build version | |
| if: always() | |
| run: | | |
| $xmlDoc = New-Object System.Xml.XmlDocument | |
| $file = [System.IO.Path]::Combine("${{ github.workspace }}", "Directory.Packages.props") | |
| [xml]$xmlDoc = Get-Content $file | |
| $node = $xmlDoc.SelectSingleNode('//PackageVersion[@Include="PanelSwWix4.Dtf.Compression"]/@Version') | |
| Add-Content -Path ${{ github.env }} -Value ("WIX_VERSION=" + $node.Value) | |
| - name: Validate test results | |
| shell: cmd | |
| run: 7z a build\testresults.zip @src\testresultfilelist.txt | |
| - name: Save build | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts | |
| path: build/artifacts/ | |
| - name: Collect integration test logs | |
| if: ${{ !cancelled() }} | |
| shell: cmd | |
| run: 7z a "build\logs\test_burn_%GITHUB_RUN_ID%.zip" "%TEMP%\*.log" "%TEMP%\..\*.log" | |
| - name: Export Application event log | |
| if: ${{ !cancelled() }} | |
| shell: cmd | |
| run: wevtutil epl Application build\logs\Application.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]" | |
| - name: Export System event log | |
| if: ${{ !cancelled() }} | |
| shell: cmd | |
| run: wevtutil epl System build\logs\System.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]" | |
| # Do NOT publish logs on `official builds` (version tagged builds) as they may contain secrets in them. | |
| - name: Save logs | |
| if: ${{ env.SignBuild != 'true' && !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs_${{ github.run_id }} | |
| path: build/logs/ | |
| - name: Publish nuget packages to github | |
| if: ${{ github.event.inputs.publish_nuget == 'true' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TAGGER_PAT }} | |
| run: | | |
| dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" | |
| dotnet nuget push build/artifacts/**/PanelSwWix4.*.${{ env.WIX_VERSION }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source github | |
| dotnet nuget push build/artifacts/**/PanelSwWix4.*.${{ env.WIX_VERSION }}.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json | |
| git tag ${{ env.WIX_VERSION }} | |
| git push --tags |