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+ push :
5+ tags :
6+ - ' v*' # Triggers on tags like v1.0.0, v2.1.3, etc.
7+
8+ jobs :
9+ build-and-release :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write # Required to create releases
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Install Rust toolchain
19+ uses : dtolnay/rust-toolchain@stable
20+ with :
21+ targets : x86_64-unknown-linux-gnu
22+
23+ - name : Cache cargo registry
24+ uses : actions/cache@v4
25+ with :
26+ path : ~/.cargo/registry
27+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
28+
29+ - name : Cache cargo index
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.cargo/git
33+ key : ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
34+
35+ - name : Cache cargo build
36+ uses : actions/cache@v4
37+ with :
38+ path : target
39+ key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
40+
41+ - name : Build release binary
42+ run : cargo build --release --target x86_64-unknown-linux-gnu
43+
44+ - name : Create release archive
45+ run : |
46+ cd target/x86_64-unknown-linux-gnu/release
47+ tar -czf ../../../aquinas-${{ github.ref_name }}-x86_64-linux.tar.gz aquinas
48+ cd ../../..
49+
50+ - name : Create Release
51+ uses : softprops/action-gh-release@v1
52+ with :
53+ files : aquinas-${{ github.ref_name }}-x86_64-linux.tar.gz
54+ generate_release_notes : true
55+ env :
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments