File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454 with :
5555 name : TestBuddy-installer
5656 path : TestBuddy-Setup.exe
57+
58+ - name : Optional: Sign artifacts (if PFX secret provided)
59+ if : ${{ secrets.SIGN_CERT_PFX != '' && secrets.SIGN_CERT_PASSWORD != '' }}
60+ shell : powershell
61+ run : |
62+ Write-Host "Writing PFX to file and attempting to sign artifacts..."
63+ $pfxBase64 = '${{ secrets.SIGN_CERT_PFX }}'
64+ [IO.File]::WriteAllBytes('cert.pfx', [Convert]::FromBase64String($pfxBase64))
65+ choco install osslsigncode -y || Write-Host 'osslsigncode install may have failed'
66+ if (Test-Path .\dist\TestBuddy.exe) {
67+ Write-Host 'Signing dist\\TestBuddy.exe'
68+ osslsigncode sign -pkcs12 cert.pfx -pass '${{ secrets.SIGN_CERT_PASSWORD }}' -n 'TestBuddy' -i 'http://testbuddy.local' -t 'http://timestamp.digicert.com' -in .\dist\TestBuddy.exe -out .\dist\TestBuddy-signed.exe || Write-Host 'Signing EXE failed'
69+ }
70+ if (Test-Path .\TestBuddy-Setup.exe) {
71+ Write-Host 'Signing TestBuddy-Setup.exe'
72+ osslsigncode sign -pkcs12 cert.pfx -pass '${{ secrets.SIGN_CERT_PASSWORD }}' -n 'TestBuddy' -i 'http://testbuddy.local' -t 'http://timestamp.digicert.com' -in .\TestBuddy-Setup.exe -out .\TestBuddy-Setup-signed.exe || Write-Host 'Signing installer failed'
73+ }
74+
75+ - name : Create GitHub release and attach artifacts
76+ uses : ncipollo/release-action@v1
77+ with :
78+ tag : build-${{ github.run_number }}
79+ name : TestBuddy build ${{ github.run_number }}
80+ body : |
81+ Automated build from commit ${{ github.sha }}
82+ - Runner: ${{ runner.os }}
83+ - Workflow: ${{ github.workflow }}
84+ files : |
85+ dist/TestBuddy*.exe
86+ TestBuddy-Setup*.exe
You can’t perform that action at this time.
0 commit comments