Skip to content

Commit a5ed61a

Browse files
committed
fix: update Rust toolchain action and improve binary copying for cross-platform compatibility
1 parent be3f39b commit a5ed61a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ jobs:
4040
# │ 2. SET UP TOOLCHAIN │
4141
# └────────────────────────────────────────────────────────────────────┘
4242
- name: Install Rust (stable)
43-
uses: actions-rs/toolchain@v1
43+
uses: dtolnay/rust-toolchain@stable
4444
with:
45-
toolchain: stable
46-
target: ${{ matrix.target }}
47-
profile: minimal
45+
targets: ${{ matrix.target }}
4846

4947
# ┌────────────────────────────────────────────────────────────────────┐
5048
# │ 3. BUILD BINARY │
@@ -58,12 +56,19 @@ jobs:
5856
- name: Create distribution folder
5957
run: mkdir -p dist
6058

61-
- name: Copy and rename binary
59+
- name: Copy and rename binary (Linux/macOS)
60+
if: runner.os != 'Windows'
6261
run: |
6362
cp \
6463
target/${{ matrix.target }}/release/favis${{ matrix.ext }} \
6564
dist/favis-${{ matrix.target }}${{ matrix.ext }}
6665
66+
- name: Copy and rename binary (Windows)
67+
if: runner.os == 'Windows'
68+
shell: pwsh
69+
run: |
70+
Copy-Item -Path "target\${{ matrix.target }}\release\favis${{ matrix.ext }}" -Destination "dist\favis-${{ matrix.target }}${{ matrix.ext }}"
71+
6772
# ┌────────────────────────────────────────────────────────────────────┐
6873
# │ 5. GENERATE CHECKSUM │
6974
# └────────────────────────────────────────────────────────────────────┘

0 commit comments

Comments
 (0)