Skip to content

Commit 2d5a3c4

Browse files
committed
Fix release workflow permissions and add clippy/fmt checks
1 parent 45b5da6 commit 2d5a3c4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,36 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: write
9+
710
env:
811
CARGO_TERM_COLOR: always
912

1013
jobs:
14+
fmt:
15+
name: Formatting
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dtolnay/rust-toolchain@stable
20+
with:
21+
components: rustfmt
22+
- run: cargo fmt --check
23+
24+
clippy:
25+
name: Clippy
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: clippy
32+
- uses: Swatinem/rust-cache@v2
33+
- run: cargo clippy -- -D warnings
34+
1135
build:
36+
needs: [fmt, clippy]
1237
name: Build (${{ matrix.os }})
1338
runs-on: ${{ matrix.os }}
1439
strategy:

0 commit comments

Comments
 (0)