fix: use CARGO_REGISTRY_TOKEN env var in release workflow #359
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: cargo build --verbose | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run Tests | |
| run: cargo test --verbose | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run cargo fmt | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| publish-dry-run: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Verify crate packaging | |
| run: | | |
| # --no-verify skips the build step (which tries to fetch deps from crates.io). | |
| # spawned-concurrency is skipped entirely because it depends on spawned-macros | |
| # which isn't on crates.io yet — cargo can't even package it. | |
| # TODO: after first publish, switch all three to: cargo publish --dry-run | |
| cargo package --package spawned-macros --no-verify | |
| cargo package --package spawned-rt --no-verify |