Skip to content

Commit 4f104f6

Browse files
ci(release): build Windows binary natively on windows-2022 runner (#458)
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/ccc78e58-6010-4e75-9c8b-40d449eec362 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent 1238d96 commit 4f104f6

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,37 +72,36 @@ jobs:
7272
--clobber
7373
7474
build-windows:
75-
name: Build (Windows cross-compile)
75+
name: Build (Windows)
7676
needs: release-please
7777
if: >-
7878
always() &&
7979
(needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch')
80-
runs-on: ubuntu-22.04
80+
runs-on: windows-2022
8181
steps:
8282
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8383

8484
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
85-
with:
86-
targets: x86_64-pc-windows-gnu
8785

8886
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
89-
with:
90-
key: windows-cross
91-
92-
- name: Install cross-compilation toolchain
93-
run: sudo apt-get update && sudo apt-get install -y gcc-mingw-w64-x86-64
9487

9588
- name: Build
96-
run: cargo build --release --target x86_64-pc-windows-gnu --verbose
89+
run: cargo build --release --verbose
90+
91+
- name: Run tests
92+
run: cargo test --verbose
93+
94+
- name: Prepare release assets
95+
run: |
96+
Copy-Item target/release/ado-aw.exe target/release/ado-aw-windows-x64.exe
9797
9898
- name: Upload release assets
9999
env:
100100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101101
run: |
102-
TAG="${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"
103-
cp target/x86_64-pc-windows-gnu/release/ado-aw.exe ado-aw-windows-x64.exe
104-
gh release upload "$TAG" \
105-
ado-aw-windows-x64.exe \
102+
$TAG = "${{ needs.release-please.outputs.tag_name || github.event.inputs.tag_name }}"
103+
gh release upload "$TAG" `
104+
target/release/ado-aw-windows-x64.exe `
106105
--clobber
107106
108107
build-macos-arm64:

0 commit comments

Comments
 (0)