| 1 | name: Build WiX Toolset v6 |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | - master |
| 8 | pull_request: |
| 9 | branches: |
| 10 | - main |
| 11 | workflow_dispatch: |
| 12 | inputs: |
| 13 | tags: |
| 14 | manual: true |
| 15 | |
| 16 | env: |
| 17 | DOTNET_NOLOGO: true |
| 18 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true |
| 19 | DOTNET_CLI_TELEMETRY_OPTOUT: true |
| 20 | NUGET_XMLDOC_MODE: skip |
| 21 | |
| 22 | jobs: |
| 23 | build: |
| 24 | name: Build |
| 25 | runs-on: windows-2022 |
| 26 | permissions: |
| 27 | packages: write |
| 28 | id-token: write |
| 29 | steps: |
| 30 | - name: Checkout code |
| 31 | uses: actions/checkout@v4 |
| 32 | with: |
| 33 | fetch-depth: 0 |
| 34 | |
| 35 | # - name: Configure Visual Studio |
| 36 | # shell: cmd |
| 37 | # run: ./src/vs_config.cmd |
| 38 | |
| 39 | - name: Install sign tool |
| 40 | if: (github.ref == 'refs/heads/master') |
| 41 | shell: cmd |
| 42 | run: dotnet tool install --tool-path build\.tools sign --version 0.9.1-beta.24170.3 |
| 43 | |
| 44 | - name: Configure automated logging and crash dumps |
| 45 | shell: cmd |
| 46 | run: | |
| 47 | reg add HKLM\Software\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f |
| 48 | reg add HKLM\Software\WOW6432Node\Policies\Microsoft\Windows\Installer /t REG_SZ /v Logging /d voicewarmupx /f |
| 49 | reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_EXPAND_SZ /v DumpFolder /d "%CD%\build\logs\crashdumps" /f |
| 50 | reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f |
| 51 | reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1 /f |
| 52 | reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_EXPAND_SZ /v DumpFolder /d "%CD%\build\logs\crashdumps" /f |
| 53 | reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpCount /d 10 /f |
| 54 | reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps" /t REG_DWORD /v DumpType /d 1 |
| 55 | |
| 56 | - name: 'Az CLI login' |
| 57 | if: (github.ref == 'refs/heads/master') |
| 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 }} |
| 63 | |
| 64 | - name: Build wix6 |
| 65 | shell: cmd |
| 66 | run: ./src/build_official.cmd |
| 67 | env: |
| 68 | RuntimeTestsEnabled: true |
| 69 | SigningKeyVaultUri: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_VAULTURI || '' }} |
| 70 | SigningTenantId: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_TENANTID || '' }} |
| 71 | SigningClientId: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_CLIENTID || '' }} |
| 72 | SigningClientSecret: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_SECRET || '' }} |
| 73 | SigningCertName: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_CERTNAME || '' }} |
| 74 | |
| 75 | - name: Validate test results |
| 76 | shell: cmd |
| 77 | run: 7z a build\testresults.zip @src\testresultfilelist.txt |
| 78 | |
| 79 | - name: Save build |
| 80 | uses: actions/upload-artifact@v4 |
| 81 | with: |
| 82 | name: artifacts |
| 83 | path: build/artifacts/ |
| 84 | |
| 85 | - name: Collect integration test logs |
| 86 | if: always() |
| 87 | shell: cmd |
| 88 | run: 7z a "build\logs\test_burn_%GITHUB_RUN_ID%.zip" "%TEMP%\*.log" "%TEMP%\..\*.log" |
| 89 | |
| 90 | - name: Export Application event log |
| 91 | if: always() |
| 92 | shell: cmd |
| 93 | run: wevtutil epl Application build\logs\Application.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]" |
| 94 | |
| 95 | - name: Export System event log |
| 96 | if: always() |
| 97 | shell: cmd |
| 98 | run: wevtutil epl System build\logs\System.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]" |
| 99 | |
| 100 | # Do NOT publish logs on `master` branch as they may contain secrets in them. |
| 101 | - name: Save logs |
| 102 | if: github.ref != 'refs/heads/master' && always() |
| 103 | uses: actions/upload-artifact@v4 |
| 104 | with: |
| 105 | name: logs_${{ github.run_id }} |
| 106 | path: build/logs/ |
| 107 | |
| 108 | - name: Push to GitHub Packages |
| 109 | if: github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') |
| 110 | run: dotnet nuget push "build/artifacts/**/*.nupkg" --source https://nuget.pkg.github.com/wixtoolset/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |