|
1 | 1 | jobs: |
2 | 2 | build: |
3 | 3 | env: |
4 | | - WINDOWS_SIGNING_CERT: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE }} |
5 | 4 | APPLE_SIGNING_CERT: ${{ secrets.APPLE_SIGNING_CERTIFICATE }} |
6 | 5 | runs-on: ${{ matrix.os }} |
7 | 6 | steps: |
|
77 | 76 | fi |
78 | 77 | done < <(tomlq -r '.project.scripts|to_entries[]|"\(.key) \(.value|split(":")|join(" "))"' pyproject.toml) |
79 | 78 | shell: 'bash' |
80 | | - - if: (matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm') && env.WINDOWS_SIGNING_CERT != '' |
81 | | - name: 'Sign Windows binaries' |
82 | | - env: |
83 | | - SIGNING_CERT_BASE64: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE }} |
84 | | - SIGNING_PASSWORD: ${{ secrets.WINDOWS_SIGNING_PASSWORD }} |
85 | | - TIMESTAMP_URL: ${{ secrets.WINDOWS_TIMESTAMP_URL }} |
86 | | - run: | |
87 | | - $certBytes = [Convert]::FromBase64String($env:SIGNING_CERT_BASE64) |
88 | | - $certPath = Join-Path $env:RUNNER_TEMP 'cert.pfx' |
89 | | - [IO.File]::WriteAllBytes($certPath, $certBytes) |
90 | | - $timestampArgs = @() |
91 | | - if ($env:TIMESTAMP_URL) { |
92 | | - $timestampArgs = @('/tr', $env:TIMESTAMP_URL, '/td', 'sha256') |
93 | | - } |
94 | | - foreach ($exe in (Get-ChildItem -Path dist\*.exe)) { |
95 | | - Write-Host "Signing '$($exe.Name)'..." |
96 | | - & signtool sign /f $certPath /p $env:SIGNING_PASSWORD @timestampArgs /fd sha256 $exe.FullName |
97 | | - if ($LASTEXITCODE -ne 0) { throw "signtool failed for $($exe.Name)" } |
98 | | - } |
99 | | - Remove-Item $certPath |
100 | | - shell: 'pwsh' |
101 | | - - if: matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm' |
102 | | - name: 'Test binary' |
103 | | - run: | |
104 | | - $distFiles = Get-ChildItem -Path dist\*.exe |
105 | | - Write-Host "Found $($distFiles.Count) files in dist/: $(( $distFiles | ForEach-Object { $_.Name } ) -join ', ')" |
106 | | - foreach ($file in $distFiles) { |
107 | | - Write-Host "Testing '$($file.FullName)'." |
108 | | - & $file.FullName --help |
109 | | - } |
110 | 79 | - if: (matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel') && env.APPLE_SIGNING_CERT != '' |
111 | 80 | name: 'Sign and notarise macOS binaries' |
112 | 81 | env: |
@@ -194,13 +163,6 @@ jobs: |
194 | 163 | rm -fR _out |
195 | 164 | mkdir _out |
196 | 165 | zip -j _out/mkwineprefix-${{ github.ref_name }}-${{ matrix.suffix }}.zip ${{ matrix.dist_path }} |
197 | | - - if: (matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm') && github.ref_type == 'tag' |
198 | | - name: 'Zip files' |
199 | | - run: | |
200 | | - Remove-Item -Force _out -ErrorAction Continue |
201 | | - New-Item -ItemType Directory -Name _out |
202 | | - Compress-Archive -Path ${{ matrix.dist_path }} -DestinationPath _out/mkwineprefix-${{ github.ref_name }}-${{ matrix.suffix }}.zip |
203 | | - shell: pwsh |
204 | 166 | - if: github.ref_type == 'tag' |
205 | 167 | name: 'Attest' |
206 | 168 | uses: 'actions/attest@v4.1.0' |
@@ -229,12 +191,6 @@ jobs: |
229 | 191 | - os: 'macos-latest' |
230 | 192 | dist_path: 'dist/*' |
231 | 193 | suffix: 'mac-arm64' |
232 | | - - os: 'windows-latest' |
233 | | - dist_path: 'dist/*.exe' |
234 | | - suffix: 'win-x86_64' |
235 | | - - os: 'windows-11-arm' |
236 | | - dist_path: 'dist/*.exe' |
237 | | - suffix: 'win-arm64' |
238 | 194 | name: 'PyInstaller' |
239 | 195 | 'on': |
240 | 196 | push: |
|
0 commit comments