File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags : ["v[0-9]+.[0-9]+.[0-9]+*"]
7+
8+ jobs :
9+ build-release :
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ include :
15+ # Linux
16+ - os : ubuntu-latest
17+ target : x86_64-unknown-linux-musl
18+ - os : ubuntu-latest
19+ target : aarch64-unknown-linux-musl
20+
21+ # Darwin
22+ - os : macos-latest
23+ target : x86_64-apple-darwin
24+ - os : macos-latest
25+ target : aarch64-apple-darwin
26+
27+ # Windows
28+ - os : windows-latest
29+ target : x86_64-pc-windows-msvc
30+ ext : .exe
31+
32+ steps :
33+ - name : Checkout repo
34+ uses : actions/checkout@v2
35+
36+ - name : Setup Rust toolchain
37+ uses : actions-rs/toolchain@v1
38+ with :
39+ profile : minimal
40+ override : true
41+ target : ${{ matrix.target }}
42+ toolchain : stable
43+
44+ - name : Build
45+ uses : actions-rs/cargo@v1
46+ with :
47+ use-cross : true
48+ command : build
49+ args : --release --target ${{ matrix.target }}
50+
51+ - name : Rename Artifacts
52+ shell : bash
53+ run : |
54+ ver=${GITHUB_REF#refs/tags/}
55+ ASSET_PATH=rush-$ver-${{ matrix.target }}${{ matrix.ext }}
56+ mv target/${{ matrix.target }}/release/rush $ASSET_PATH
57+ echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV
58+
59+ - name : Release
60+ uses : softprops/action-gh-release@v1
61+ if : startsWith(github.ref, 'refs/tags/')
62+ with :
63+ files : ${{ env.ASSET_PATH }}
64+ env :
65+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ /target
2+ * .csv
You can’t perform that action at this time.
0 commit comments