build: bump rf24ble-rs to v0.1.2 #60
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 | |
| permissions: | |
| contents: read | |
| 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 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| run: rustup update --no-self-update | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install Just | |
| run: cargo binstall -y just cargo-nextest cargo-llvm-cov | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: cargo-lib-${{ 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 and generate reports | |
| run: just test ci lcov | |
| - uses: codecov/codecov-action@v5 | |
| 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: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Get pkg from tag | |
| id: pkg | |
| shell: bash | |
| run: | | |
| tag=${{ github.ref_name }} | |
| pkg=$(echo "$tag" | sed -E 's;([^/]+)/.*;\1;') | |
| echo "name=$pkg" >> "$GITHUB_OUTPUT" | |
| - name: Install Rust | |
| run: rustup update stable --no-self-update | |
| - run: cargo publish -p ${{ steps.pkg.outputs.name }} | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |