Add GitHub Actions workflow to build, sign, and upload Windows EXE#1
Add GitHub Actions workflow to build, sign, and upload Windows EXE#1diskchord wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abc0c42755
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| -dlib "Azure.CodeSigning.Dlib.dll" ` | ||
| -dmdf "$env:AZURE_TRUSTED_SIGNING_ACCOUNT/$env:AZURE_TRUSTED_SIGNING_PROFILE" ` |
There was a problem hiding this comment.
Use supported AzureSignTool signing parameters
This signing command mixes Trusted Signing signtool flags with azuresigntool: dotnet tool install --global AzureSignTool installs the AzureSignTool CLI, whose documented sign parameters are Key Vault options (including required -kvc) and do not include -dlib/-dmdf. In this form, the step will fail during argument parsing instead of signing, so every release/workflow_dispatch run will fail before upload.
Useful? React with 👍 / 👎.
| shell: pwsh | ||
| run: | | ||
| $exe = "dist/APSMIDIPrepTool.exe" | ||
| Get-AuthenticodeSignature $exe | Format-List |
There was a problem hiding this comment.
Fail workflow on invalid Authenticode verification
The verification step only formats and prints the signature object, but never asserts Status == Valid; Get-AuthenticodeSignature can return successfully for unsigned/invalid files, so this workflow can continue to artifact upload even when signing is ineffective or broken. Add an explicit status check and throw on any non-Valid result to enforce signed-release guarantees.
Useful? React with 👍 / 👎.
Motivation
Description
/.github/workflows/release-windows-signed.ymlwhich is triggered byworkflow_dispatchandreleaseevents and setscontents: writepermissions.windows-latest, checks out the repo, sets up Python3.11, installs dependencies andpyinstaller, and buildsAPSMIDIPrepTool.exefromaps_midi_prep_tool.pyusingpyinstaller.AzureSignToolviadotnet tool, signs the built EXE withazuresigntool signusing Azure credential secrets (AZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TRUSTED_SIGNING_ACCOUNT,AZURE_TRUSTED_SIGNING_PROFILE,AZURE_TRUSTED_SIGNING_ENDPOINT), and verifies the signature withGet-AuthenticodeSignature.APSMIDIPrepTool-windows-signedwithactions/upload-artifact@v4and attaches the signed EXE to the GitHub release usingsoftprops/action-gh-release@v2when the event is arelease.Testing
workflow_dispatchor when publishing a GitHub release to perform build, sign, verify, and upload steps.Codex Task