build(deps): bump rust-lang/crates-io-auth-action from 1.0.3 to 1.0.4 #115
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: Build | |
| on: [push, pull_request] | |
| permissions: {} | |
| jobs: | |
| cargo-toml-features: | |
| name: Generate Feature Combinations | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| feature-combinations: ${{ steps.cargo-toml-features.outputs.feature-combinations }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Determine Cargo Features | |
| id: cargo-toml-features | |
| uses: Holzhaus/cargo-toml-features-action@3afa751aae4071b2d1ca1c5fa42528a351c995f4 | |
| build: | |
| needs: cargo-toml-features | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| features: ${{ fromJson(needs.cargo-toml-features.outputs.feature-combinations) }} | |
| env: | |
| CRATE_FEATURES: ${{ join(matrix.features, ',') }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Print Rust version | |
| run: rustc -vV | |
| - name: Install SDL2 | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libsdl2-dev | |
| - name: Build Package | |
| run: | # zizmor: ignore[use-trusted-publishing] | |
| cargo publish --dry-run --locked --no-default-features --features "${CRATE_FEATURES}" | |
| - name: Run Tests | |
| run: cargo test --locked --no-default-features --features "${CRATE_FEATURES}" | |
| - name: Run Benchmark | |
| run: cargo bench --locked --no-default-features --features "${CRATE_FEATURES}" | |
| - name: Generate Documentation | |
| run: cargo doc --no-deps --locked --no-default-features --features "${CRATE_FEATURES}" | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC token exchange | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Authenticate with registry | |
| id: auth | |
| uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe | |
| - name: Publish Package | |
| run: cargo publish --locked | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |