Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Commit 11213aa

Browse files
ci: use reusable workflows (#245)
1 parent 4869fc7 commit 11213aa

5 files changed

Lines changed: 20 additions & 114 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,6 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
lint:
14-
name: Lint
15-
runs-on: ubuntu-latest
16-
17-
env:
18-
RUSTFLAGS: '-Dwarnings'
19-
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v6
23-
24-
- name: Set up Rust toolchain
25-
uses: actions-rust-lang/setup-rust-toolchain@v1
26-
with:
27-
components: clippy, rustfmt
28-
29-
- name: Install Cargo Binary Install
30-
uses: cargo-bins/cargo-binstall@main
31-
32-
- name: Install crates
33-
run: cargo binstall -y --force cargo-deny cargo-machete cargo-sort
34-
35-
- name: Lint
36-
run: cargo clippy --all-features --locked
37-
38-
- name: Check dependencies
39-
run: cargo deny check
40-
41-
- name: Check unused dependencies
42-
run: cargo machete
43-
44-
- name: Check manifest formatting
45-
run: cargo sort --workspace --check
46-
47-
- name: Check formatting
48-
run: cargo fmt --all --check
49-
50-
test:
51-
name: Test
52-
runs-on: ubuntu-latest
53-
54-
steps:
55-
- name: Checkout
56-
uses: actions/checkout@v6
57-
58-
- name: Set up Rust toolchain
59-
uses: actions-rust-lang/setup-rust-toolchain@v1
60-
with:
61-
components: clippy, rustfmt
62-
63-
- name: Test
64-
run: cargo test --all-features --locked --release
13+
rust:
14+
name: Rust
15+
uses: RustForWeb/.github/.github/workflows/rust.yml@c18f3b7315df398b6af8d03f823e31daeda63114

.github/workflows/publish.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
11+
jobs:
12+
publish:
13+
name: Publish
14+
uses: RustForWeb/.github/.github/workflows/publish.yml@c18f3b7315df398b6af8d03f823e31daeda63114

.github/workflows/release.yml

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,63 +18,6 @@ permissions:
1818
jobs:
1919
release:
2020
name: Release
21-
runs-on: ubuntu-latest
22-
23-
steps:
24-
- name: Generate GitHub App token
25-
id: app-token
26-
uses: getsentry/action-github-app-token@v3
27-
with:
28-
app_id: ${{ secrets.APP_ID }}
29-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
30-
31-
- name: Checkout
32-
uses: actions/checkout@v6
33-
34-
- name: Set up Rust toolchain
35-
uses: actions-rust-lang/setup-rust-toolchain@v1
36-
with:
37-
target: wasm32-unknown-unknown
38-
39-
- name: Install Cargo Binary Install
40-
uses: cargo-bins/cargo-binstall@main
41-
42-
- name: Install crates
43-
run: cargo binstall --force -y cargo-workspaces toml-cli
44-
45-
- name: Bump version
46-
run: cargo workspaces version --all --no-git-commit --yes ${{ inputs.bump }}
47-
48-
- name: Extract version
49-
id: extract-version
50-
run: echo "VERSION=v$(toml get Cargo.toml package.version --raw)" >> "$GITHUB_OUTPUT"
51-
52-
- name: Add changes
53-
run: git add .
54-
55-
- name: Commit
56-
uses: dsanders11/github-app-commit-action@v2
57-
with:
58-
message: ${{ steps.extract-version.outputs.VERSION }}
59-
token: ${{ steps.app-token.outputs.token }}
60-
61-
- name: Reset and pull
62-
run: git reset --hard && git pull
63-
64-
- name: Tag
65-
uses: bruno-fs/repo-tagger@1.0.0
66-
with:
67-
tag: ${{ steps.extract-version.outputs.VERSION }}
68-
env:
69-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
70-
71-
- name: Release
72-
uses: softprops/action-gh-release@v3
73-
with:
74-
generate_release_notes: true
75-
make_latest: true
76-
tag_name: ${{ steps.extract-version.outputs.VERSION }}
77-
token: ${{ steps.app-token.outputs.token }}
78-
79-
- name: Publish
80-
run: cargo workspaces publish --publish-as-is --token "${{ secrets.CRATES_IO_TOKEN }}"
21+
uses: RustForWeb/.github/.github/workflows/release.yml@c18f3b7315df398b6af8d03f823e31daeda63114
22+
with:
23+
bump: ${{ inputs.bump }}

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ urlencoding = "2.1.3"
3939
[dev-dependencies]
4040
matches = "0.1.10"
4141
mockito = "1.0.0"
42-
rsa = "0.9.10"
4342
tokio = { version = "1.44.2", default-features = false, features = [
4443
"macros",
4544
"rt-multi-thread",

0 commit comments

Comments
 (0)