Bind DMA channel for SPI and I2C #22
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: Release | |
| on: | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7m-none-eabi | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - run: python scripts/sync_code.py --check | |
| - run: cargo build --release --features=stm32f100,xC | |
| - run: cargo build --release --features=stm32f103,xG,rtic | |
| - run: cargo clippy --features=stm32f103,xG,rtic | |
| - run: cargo test --target=x86_64-unknown-linux-gnu --features=std | |
| - run: python scripts/build.py --example=f103c8 | |
| publish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| environment: release # Optional: for enhanced security | |
| permissions: | |
| id-token: write # Required for OIDC token exchange | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7m-none-eabi | |
| - name: Dry run | |
| if: github.ref_type != 'tag' | |
| run: cargo publish --features=stm32f103,xG --dry-run | |
| - uses: rust-lang/crates-io-auth-action@v1 | |
| if: github.ref_type == 'tag' | |
| id: auth | |
| - name: Publish crate | |
| if: github.ref_type == 'tag' | |
| run: cargo publish --features=stm32f103,xG | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |