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+ APP_NAME=makeitbig
55+ ver=${GITHUB_REF#refs/tags/}
56+ ASSET_PATH=$APP_NAME-$ver-${{ matrix.target }}${{ matrix.ext }}
57+ mv target/${{ matrix.target }}/release/$APP_NAME $ASSET_PATH
58+ echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV
59+
60+ - name : Release
61+ uses : softprops/action-gh-release@v1
62+ if : startsWith(github.ref, 'refs/tags/')
63+ with :
64+ files : ${{ env.ASSET_PATH }}
65+ env :
66+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ /target
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " makeitbig"
3+ version = " 1.0.0"
4+ edition = " 2021"
5+
6+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+ [dependencies ]
9+ anyhow = " 1"
10+ clap = { version = " 4" , features = [" derive" ] }
11+ rand = " 0.8.5"
12+ serde = { version = " 1" , features = [" derive" ] }
You can’t perform that action at this time.
0 commit comments