Skip to content

Commit 4fecabe

Browse files
committed
Fix Windows Perl: use pwsh for cargo build, prepend Strawberry Perl via pwsh
1 parent 6b1e60d commit 4fecabe

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,15 @@ jobs:
5353
use_cross: true
5454
- target: x86_64-pc-windows-msvc
5555
os: windows-latest
56-
install_perl: true
5756
steps:
5857
- uses: actions/checkout@v6
5958

6059
- name: Install Rust toolchain
6160
run: rustup target add ${{ matrix.target }}
6261

6362
- name: Prepend Strawberry Perl to PATH (Windows)
64-
if: matrix.install_perl
65-
shell: bash
66-
run: echo "C:/Strawberry/perl/bin" >> "$GITHUB_PATH"
63+
if: runner.os == 'Windows'
64+
run: echo "C:\Strawberry\perl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
6765

6866
- name: Install cross
6967
if: matrix.use_cross
@@ -72,13 +70,13 @@ jobs:
7270
tool: cross
7371

7472
- name: Build
73+
if: "!matrix.use_cross"
74+
run: cargo build --release --target ${{ matrix.target }}
75+
76+
- name: Build (cross)
77+
if: matrix.use_cross
7578
shell: bash
76-
run: |
77-
if [ "${{ matrix.use_cross }}" = "true" ]; then
78-
cross build --release --target ${{ matrix.target }}
79-
else
80-
cargo build --release --target ${{ matrix.target }}
81-
fi
79+
run: cross build --release --target ${{ matrix.target }}
8280

8381
- name: Package and checksum
8482
id: package

0 commit comments

Comments
 (0)