File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ on : push
2+ name : Lint Rust
3+
4+ jobs :
5+ lint :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+ - uses : actions-rs/toolchain@v1
10+ with :
11+ toolchain : stable
12+ components : rustfmt, clippy
13+ - uses : Swatinem/rust-cache@v2
14+ - run : cargo --locked fmt --all --check
15+ - run : cargo --locked check
16+ - run : cargo --locked clippy --all-targets --all-features -- -D warnings
17+ - run : cargo --locked test
18+ - run : cargo --locked build --release
Original file line number Diff line number Diff line change 2020 permissions :
2121 contents : write
2222 steps :
23+ - name : Check main branch status
24+ uses : actions/github-script@v7
25+ with :
26+ script : |
27+ const result = await github.rest.repos.getCombinedStatusForRef({
28+ owner: context.repo.owner,
29+ repo: context.repo.repo,
30+ ref: 'main'
31+ });
32+ if (result.data.state !== 'success') {
33+ core.setFailed('Status checks not green on main');
34+ }
35+
2336 - name : Validate user input
2437 id : release_version
2538 run : |
You can’t perform that action at this time.
0 commit comments