Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG_FLAG: ${{ matrix.flavor == 'debug' && '-debug' || '' }}

strategy:
matrix:
Expand All @@ -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
Copy link
Contributor

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_FLAG from build_windows:?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes! 3156b97

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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]
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that whatever arch [windows-latest-8x] is can codesign both x64 and arm64 with no issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
Expand Down