Skip to content

Commit 994a5bc

Browse files
committed
update release
1 parent 7205a9b commit 994a5bc

File tree

1 file changed

+50
-45
lines changed

1 file changed

+50
-45
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,59 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v*' # Triggers on tags like v1.0.0, v2.1.3, etc.
6+
- "v*" # Triggers on tags like v1.0.0, v2.1.3, etc.
77

88
jobs:
99
build-and-release:
1010
runs-on: ubuntu-latest
1111
permissions:
12-
contents: write # Required to create releases
13-
12+
contents: write # Required to create releases
13+
1414
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 }}
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Install system dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y libdbus-1-dev pkg-config
22+
23+
- name: Install Rust toolchain
24+
uses: dtolnay/rust-toolchain@stable
25+
with:
26+
targets: x86_64-unknown-linux-gnu
27+
28+
- name: Cache cargo registry
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.cargo/registry
32+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
33+
34+
- name: Cache cargo index
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.cargo/git
38+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
39+
40+
- name: Cache cargo build
41+
uses: actions/cache@v4
42+
with:
43+
path: target
44+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
45+
46+
- name: Build release binary
47+
run: cargo build --release --target x86_64-unknown-linux-gnu
48+
49+
- name: Create release archive
50+
run: |
51+
cd target/x86_64-unknown-linux-gnu/release
52+
tar -czf ../../../aquinas-${{ github.ref_name }}-x86_64-linux.tar.gz aquinas
53+
cd ../../..
54+
55+
- name: Create Release
56+
uses: softprops/action-gh-release@v1
57+
with:
58+
files: aquinas-${{ github.ref_name }}-x86_64-linux.tar.gz
59+
generate_release_notes: true
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)