Skip to content

Commit 2857625

Browse files
authored
Update release.yml
1 parent e7c2bb9 commit 2857625

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,26 @@ jobs:
2222
bin: inputshare-client
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 0
2828

2929
- name: Install Rust
30-
uses: actions-rs/toolchain@v1
30+
uses: dtolnay/rust-toolchain@stable
3131
with:
32-
toolchain: stable
33-
profile: minimal
34-
override: true
3532
target: ${{ matrix.target }}
33+
34+
- name: Install Cross
35+
if: runner.os == 'Linux'
36+
run: cargo install cross --git https://github.com/cross-rs/cross
37+
38+
- name: Build binary (Cargo)
39+
if: runner.os != 'Linux'
40+
run: cargo build --release --locked --target=${{ matrix.target }} --bin=${{ matrix.bin }} --color=always --verbose
3641

37-
- name: Build binary
38-
uses: actions-rs/cargo@v1
39-
with:
40-
command: build
41-
args: --release --locked --target=${{ matrix.target }} --bin=${{ matrix.bin }} --color=always --verbose
42-
use-cross: ${{ runner.os == 'Linux' }}
42+
- name: Build binary (Cross)
43+
if: runner.os == 'Linux'
44+
run: cross build --release --locked --target=${{ matrix.target }} --bin=${{ matrix.bin }} --color=always --verbose
4345

4446
- name: Package (*nix)
4547
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)