File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release Binaries
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ runs-on : ${{ matrix.os }}
10+ env :
11+ BIN_NAME : secretik
12+ strategy :
13+ matrix :
14+ include :
15+ - os : ubuntu-latest
16+ target : x86_64-unknown-linux-gnu
17+ name : linux-x86_64
18+
19+ - os : ubuntu-latest
20+ target : aarch64-unknown-linux-gnu
21+ name : linux-aarch64
22+
23+ - os : macos-latest
24+ target : x86_64-apple-darwin
25+ name : macos-x86_64
26+
27+ - os : macos-latest
28+ target : aarch64-apple-darwin
29+ name : macos-aarch64
30+
31+ name : Build ${{ matrix.name }}
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v4
35+
36+ - name : Install Rust toolchain
37+ uses : dtolnay/rust-toolchain@stable
38+ with :
39+ targets : ${{ matrix.target }}
40+
41+ - name : Install dependencies (Linux ARM only)
42+ if : matrix.target == 'aarch64-unknown-linux-gnu'
43+ run : sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
44+
45+ - name : Build release
46+ run : |
47+ cargo build --release --target=${{ matrix.target }}
48+ mkdir -p dist
49+ cp target/${{ matrix.target }}/release/${{ env.BIN_NAME }} dist/${{ env.BIN_NAME }}-${{ matrix.name }}
50+
51+ - name : Upload release asset
52+ uses : softprops/action-gh-release@v2
53+ with :
54+ files : dist/${{ env.BIN_NAME }}-${{ matrix.name }}
55+ env :
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments