Skip to content

Commit 886acfe

Browse files
tidy CI workflows
1 parent 8f73ab5 commit 886acfe

3 files changed

Lines changed: 25 additions & 15 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v6
24+
- uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe #v1.0.4
25+
id: auth
2426
- name: Publish
2527
env:
26-
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
28+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
2729
run:
28-
cargo +nightly publish
30+
cargo publish

.github/workflows/rust-stability.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
name: Monthly stability checks
22

33
on:
4-
workflow_dispatch:
5-
workflow_call:
64
pull_request:
5+
push:
6+
paths:
7+
- ".github/workflows/rust-stability.yml"
78
schedule:
89
- cron: '0 3 6 * *'
9-
10-
permissions:
11-
contents: read
12-
issues: write
10+
workflow_dispatch:
11+
workflow_call:
1312

1413
env:
1514
CARGO_TERM_COLOR: always
16-
RUSTC_BOOTSTRAP: 1
1715

1816
jobs:
1917

@@ -26,9 +24,11 @@ jobs:
2624
steps:
2725
- uses: actions/checkout@v6
2826
- name: update rust
29-
run: rustup set profile default && rustup update && rustup default ${{ matrix.channel }}
27+
run: rustup set profile default && rustup install ${{ matrix.channel }}
28+
- name: Set bootstrap
29+
run: test "${{ matrix.channel }}" != "nightly" && echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV || true
3030
- name: Run tests
31-
run: cargo test --no-fail-fast
31+
run: cargo "+${{ matrix.channel }}" test --no-fail-fast
3232

3333
lint:
3434
strategy:
@@ -39,14 +39,19 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v6
4141
- name: update rust
42-
run: rustup set profile default && rustup update && rustup default ${{ matrix.channel }}
42+
run: rustup set profile default && rustup install ${{ matrix.channel }}
43+
- name: Set bootstrap
44+
run: test "${{ matrix.channel }}" != "nightly" && echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV || true
4345
- name: clippy
44-
run: cargo clippy -- --deny warnings
46+
run: cargo +${{ matrix.channel }} clippy -- --deny warnings
4547

4648
report:
4749
if: ${{ always() }}
4850
needs: [test, lint]
4951
runs-on: ubuntu-latest
52+
permissions:
53+
contents: read
54+
issues: write
5055
steps:
5156
- uses: actions/checkout@v6
5257
- name: Create issue on failure

.github/workflows/rust.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
paths:
66
- "**.rs"
77
- "Cargo.toml"
8+
- "rust-toolchain.toml"
89
- ".github/workflows/rust.yml"
910
pull_request:
1011
workflow_call:
1112

1213
env:
1314
CARGO_TERM_COLOR: always
14-
RUSTC_BOOTSTRAP: 1
1515

1616
jobs:
1717

@@ -64,10 +64,13 @@ jobs:
6464

6565
runs-on: ubuntu-latest
6666

67+
env:
68+
RUSTC_BOOTSTRAP: 1
69+
6770
steps:
6871
- uses: actions/checkout@v6
6972
- name: install cargo-msrv
70-
uses: taiki-e/install-action@v2.79.2
73+
uses: taiki-e/install-action@v2.75.27
7174
with:
7275
tool: cargo-msrv
7376
- name: check MSRV

0 commit comments

Comments
 (0)