build(deps): bump the actions group across 1 directory with 3 updates #134
Workflow file for this run
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: Rust | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - crates/**/*.rs | |
| - crates/**/Cargo.toml | |
| - .github/workflows/rust.yml | |
| tags: | |
| - 'rf24-rs/*' | |
| - 'rf24ble-rs/*' | |
| # - 'rf24network-rs/*' | |
| # - 'rf24mesh-rs/*' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - crates/**/*.rs | |
| - crates/**/Cargo.toml | |
| - .github/workflows/rust.yml | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| permissions: {} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| run: rustup update --no-self-update | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@11f258db84cec40fc56c7b10bfc37c31dd9a3c98 # v1.17.3 | |
| - name: Install cargo-llvm-cov, cargo-nextest, and nur | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: cargo binstall -y cargo-nextest cargo-llvm-cov nur | |
| - name: Cache deps | |
| uses: actions/cache@v5 # zizmor: ignore[cache-poisoning] | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| key: cargo-crates-${{ hashFiles('crates/*/src/**', 'crates/**/Cargo.toml') }} | |
| - run: rustup component add llvm-tools-preview | |
| # this enables a tool (for default toolchain) needed to measure code coverage. | |
| - name: Run tests | |
| run: nur test --profile ci | |
| - name: Generate coverage reports | |
| run: nur test lcov | |
| - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| if: github.repository == 'nRF24/rf24-rs' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: true | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| if: startswith(github.ref, 'refs/tags/') | |
| permissions: | |
| # needed for trusted publishing | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup nushell | |
| uses: hustcer/setup-nu@920172d92eb04671776f3ba69d605d3b09351c30 # v3.22 | |
| with: | |
| version: ${{ vars.NU_SHELL_VERSION || '*' }} | |
| - name: Get pkg from tag | |
| id: pkg | |
| shell: nu {0} | |
| run: |- | |
| let tag = $env.GITHUB_REF_NAME | |
| let pkg = $tag | parse "{name}/{version}" | first | |
| $"name=($pkg | get name)\n" | save --append $env.GITHUB_OUTPUT | |
| - name: Install Rust | |
| run: rustup update stable --no-self-update | |
| - name: Establish provenance | |
| uses: rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3 | |
| id: auth | |
| - run: cargo publish -p ${PKG_NAME} | |
| env: | |
| PKG_NAME: ${{ steps.pkg.outputs.name }} | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |