Skip to content

Commit c20b122

Browse files
committed
Updates, cleanup, ci release
1 parent 9e2d971 commit c20b122

File tree

6 files changed

+228
-384
lines changed

6 files changed

+228
-384
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,20 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
test:
1414
runs-on: ubuntu-latest
15-
1615
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Cache dependencies
20-
uses: actions/cache@v3
21-
with:
22-
path: |
23-
~/.cargo/bin/
24-
~/.cargo/registry/index/
25-
~/.cargo/registry/cache/
26-
~/.cargo/git/db/
27-
target/
28-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
29-
30-
- name: Install Rust toolchain
31-
uses: actions-rs/toolchain@v1
32-
with:
33-
toolchain: stable
34-
components: rustfmt, clippy
35-
36-
- name: Check formatting
37-
run: cargo fmt -- --check
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt, clippy
20+
- uses: Swatinem/rust-cache@v2
3821

39-
- name: Lint code
40-
run: cargo clippy -- -D warnings
22+
- name: Check formatting
23+
run: cargo fmt -- --check
4124

42-
- name: Build
43-
run: cargo build --release --verbose
25+
- name: Lint code
26+
run: cargo clippy -- -D warnings
4427

45-
- name: Run tests
46-
run: cargo test --verbose
28+
- name: Run tests
29+
run: cargo test --verbose

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
- uses: Swatinem/rust-cache@v2
18+
- name: cargo test
19+
run: cargo test
20+
- name: cargo publish
21+
run: cargo publish
22+
env:
23+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
24+
- name: GitHub Release
25+
uses: softprops/action-gh-release@v2
26+

0 commit comments

Comments
 (0)