Skip to content

Commit 9d7158d

Browse files
committed
Add CI
1 parent ce6486e commit 9d7158d

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: CI
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "*"
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: dtolnay/rust-toolchain@stable
14+
with:
15+
toolchain: stable
16+
components: clippy rustfmt
17+
18+
- name: Setup the build env
19+
run: |
20+
sudo apt update
21+
sudo apt install -y libdbus-1-dev pkg-config
22+
23+
- name: Linting
24+
run: |
25+
cargo clippy --workspace --all-features -- -D warnings
26+
cargo fmt --all -- --check
27+
28+
- name: Debug builds
29+
run: cargo build

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Release
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
jobs:
8+
build:
9+
permissions:
10+
contents: write
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
with:
16+
toolchain: stable
17+
18+
- name: Setup the build env
19+
run: |
20+
sudo apt update
21+
sudo apt install -y libdbus-1-dev pkg-config
22+
23+
- name: Build for x86_64
24+
run: |
25+
cargo build --release
26+
cp target/release/bluetui bluetui-x86_64-linux-gnu
27+
28+
- name: Release
29+
uses: softprops/action-gh-release@v1
30+
with:
31+
body: |
32+
[Release.md](${{ github.server_url }}/${{ github.repository }}/blob/master/Release.md)
33+
files: "bluetui*"
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)