-
Notifications
You must be signed in to change notification settings - Fork 23
Code-sign ark binaries on Windows #985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,6 @@ jobs: | |
|
|
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| DEBUG_FLAG: ${{ matrix.flavor == 'debug' && '-debug' || '' }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
|
|
@@ -45,17 +44,60 @@ jobs: | |
| cargo clean | ||
| cargo build ${{ matrix.flavor == 'release' && '--release' || '' }} --target ${{ matrix.rust_target_prefix }}-pc-windows-msvc | ||
|
|
||
| - name: Create archive | ||
| - name: Upload unsigned executable for signing | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ark-${{ matrix.flavor }}-windows-${{ matrix.arch }}-unsigned | ||
| path: target\${{ matrix.rust_target_prefix }}-pc-windows-msvc\${{ matrix.flavor }}\ark.exe | ||
|
|
||
| sign_windows: | ||
| name: "Sign Windows Binaries" | ||
| uses: posit-dev/posit-gh-actions/.github/workflows/sign-windows.yml@main | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kind of! It's one of our "Posit Larger Runners". IIRC it is not hosted by Posit but we do pay for it via Github Enterprise. |
||
| needs: [build_windows] | ||
| secrets: inherit | ||
| strategy: | ||
| matrix: | ||
| arch: [x64, arm64] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume that whatever arch
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question; yes, it can. It's been code signing the arm64 version of Positron for a few months now. |
||
| flavor: [debug, release] | ||
| with: | ||
| unsigned_artifact_name: ark-${{ matrix.flavor }}-windows-${{ matrix.arch }}-unsigned | ||
| signed_artifact_name: ark-${{ matrix.flavor }}-windows-${{ matrix.arch }}-signed | ||
|
|
||
| repackage_signed_windows: | ||
| name: Repackage Signed Windows Binaries | ||
| runs-on: windows-latest | ||
| needs: [sign_windows] | ||
| timeout-minutes: 10 | ||
|
|
||
| env: | ||
| DEBUG_FLAG: ${{ matrix.flavor == 'debug' && '-debug' || '' }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| arch: [x64, arm64] | ||
| flavor: [debug, release] | ||
|
|
||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Download signed executable | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ark-${{ matrix.flavor }}-windows-${{ matrix.arch }}-signed | ||
| path: signed | ||
|
|
||
| - name: Create signed archive | ||
| shell: pwsh | ||
| run: | | ||
| # Compress the kernel to an archive | ||
| # Compress the signed kernel to an archive | ||
| $params = @{ | ||
| Path = "target\${{ matrix.rust_target_prefix }}-pc-windows-msvc\${{ matrix.flavor }}\ark.exe", "LICENSE", "crates\ark\NOTICE" | ||
| Path = "signed\ark.exe", "LICENSE", "crates\ark\NOTICE" | ||
| DestinationPath = "ark-${{ inputs.version }}${{ env.DEBUG_FLAG }}-windows-${{ matrix.arch }}.zip" | ||
| } | ||
| Compress-Archive @params | ||
|
|
||
| - name: Upload client archive | ||
| - name: Upload signed archive | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ark-${{ matrix.flavor }}-windows-${{ matrix.arch }}-archive | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove
DEBUG_FLAGfrombuild_windows:?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! 3156b97