2121 runs-on : ubuntu-latest
2222 steps :
2323 - uses : actions/checkout@v4
24+ - name : Install Rust
25+ uses : dtolnay/rust-toolchain@stable
2426 - name : Build
2527 run : cargo build --verbose
2628 - name : Run tests
@@ -34,27 +36,21 @@ jobs:
3436 strategy :
3537 matrix :
3638 target :
37- - x86_64-linux-gnu # amd64
38- - aarch64-linux-gnu # arm64
39+ - x86_64-unknown- linux-gnu # amd64
40+ - aarch64-unknown- linux-gnu # arm64
3941 steps :
4042 - uses : actions/checkout@v4
4143
42- - name : Install Rust toolchain
43- uses : actions-rs/ toolchain@v1
44+ - name : Install Rust
45+ uses : dtolnay/rust- toolchain@stable
4446 with :
45- profile : minimal
46- toolchain : stable
47- target : ${{ matrix.target }}
48- override : true
47+ targets : ${{ matrix.target }}
4948
50- - name : Install cross-compilation tools
51- uses : taiki-e/setup-cross-toolchain-action@v1
52- with :
53- target : ${{ matrix.target }}
49+ - name : Install cross
50+ run : cargo install cross --git https://github.com/cross-rs/cross
5451
5552 - name : Build binary
56- run : |
57- cargo build --release --target ${{ matrix.target }}
53+ run : cross build --release --target ${{ matrix.target }}
5854
5955 - name : Prepare binary
6056 run : |
@@ -79,12 +75,12 @@ jobs:
7975
8076 - name : Get the version
8177 id : get_version
82- run : echo ::set-output name= VERSION:: ${GITHUB_REF#refs/tags/}
78+ run : echo " VERSION= ${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
8379
8480 - name : Create Release
8581 uses : softprops/action-gh-release@v1
8682 with :
87- name : Release ${{ steps.get_version.outputs .VERSION }}
83+ name : Release ${{ env .VERSION }}
8884 draft : false
8985 prerelease : false
9086 files : |
0 commit comments