feat(ci): use OIDC Trusted Publishing for crates.io (#501) #177
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-plz | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| id-token: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: release-plz | |
| cancel-in-progress: false | |
| jobs: | |
| release-plz: | |
| name: Release-plz | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.RELEASE_TOKEN }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Run release-plz | |
| uses: MarcoIeni/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| # Uses OIDC Trusted Publishing - no CARGO_REGISTRY_TOKEN needed | |
| # Trusted publishers configured on crates.io for all workspace crates |