Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@neyunse
Copy link
Collaborator

@neyunse neyunse commented Aug 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 5, 2025 00:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the build system to support code signing for Windows executables and updates artifact handling by making zip file creation optional and uploading the entire dist directory instead of specific zip files.

  • Adds a --no-zip flag to the build script to skip zip file creation
  • Implements code signing for Windows executables using PFX certificates
  • Changes artifact uploads to include the entire dist directory rather than pre-zipped files

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
build.py Adds optional --no-zip flag support to skip zip file creation during build
.github/workflows/build-multiplatform.yml Implements Windows code signing and updates artifact uploads to use dist directory

pip install -r requirements.txt
- name: Build engine and bootstrapper
run: |
python build.py
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build.py script should be called with the --no-zip flag since the workflow now uploads the entire dist directory instead of zip files. This ensures consistency with the new artifact upload approach.

Suggested change
python build.py
python build.py --no-zip

Copilot uses AI. Check for mistakes.
- name: Build engine and bootstrapper
run: |
python build.py
- name: Decodificar certificado PFX
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The step name is in Spanish. For consistency with the rest of the workflow which uses English, consider using 'Decode PFX certificate' instead.

Suggested change
- name: Decodificar certificado PFX
- name: Decode PFX certificate

Copilot uses AI. Check for mistakes.
echo "${{ secrets.CODESIGN_PFX }}" | Out-File -Encoding ascii -FilePath cert_base64.txt
certutil -decode cert_base64.txt cert.pfx
shell: pwsh
- name: Firmar engine.exe y bootstrapper.exe
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The step name is in Spanish. For consistency with the rest of the workflow which uses English, consider using 'Sign engine.exe and bootstrapper.exe' instead.

Suggested change
- name: Firmar engine.exe y bootstrapper.exe
- name: Sign engine.exe and bootstrapper.exe

Copilot uses AI. Check for mistakes.
pip install -r requirements.txt
- name: Build engine and bootstrapper
run: |
python build.py
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build.py script should be called with the --no-zip flag since the workflow now uploads the entire dist directory instead of zip files. This ensures consistency with the new artifact upload approach.

Suggested change
python build.py
python build.py --no-zip

Copilot uses AI. Check for mistakes.
Comment on lines 42 to 43
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded path to signtool.exe with a specific version (10.0.19041.0) may break if the Windows Kit version changes on the runner. Consider using a more flexible approach or documenting the version dependency.

Suggested change
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe
$SigntoolPath = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\" -Directory | Sort-Object Name -Descending | Select-Object -First 1 | ForEach-Object { Join-Path $_.FullName "x64\signtool.exe" }
& $SigntoolPath sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe
& $SigntoolPath sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe

Copilot uses AI. Check for mistakes.
@neyunse neyunse merged commit 81fdb33 into dev Aug 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants