Repository navigation
Merge pull request #170 from github/release-plz-fix-ci #3
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
| # This workflow only publishes releases for PRs created by create-release-pr.yaml | |
| # | |
| # Crates are published with crates.io Trusted Publishing: release-plz exchanges this workflow's | |
| # GitHub OIDC identity for a short-lived crates.io token, so there is no `CARGO_REGISTRY_TOKEN` | |
| # secret. Each crate's trusted publisher on crates.io must be configured with workflow | |
| # `publish-release.yaml` and environment `crates-io`. | |
| # | |
| # See https://github.com/github/rust-gems/blob/main/CONTRIBUTING.md#releasing-a-crate for more details. | |
| name: Release any unpublished crates | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| # Release any unpublished packages | |
| release-plz-release: | |
| name: Release-plz release | |
| runs-on: ubuntu-latest | |
| # Gate releases behind an environment so protection rules apply, and so the OIDC claim | |
| # matches the trusted publisher configured on crates.io. | |
| environment: crates-io | |
| permissions: | |
| contents: write | |
| id-token: write # Required to mint the crates.io OIDC token. | |
| concurrency: # Serialize releases so runs don't race to publish the same version or tag | |
| group: release-plz-release-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | |
| - name: Run release-plz | |
| uses: release-plz/action@b8d6b54b02889ff2ae2bb82e8b57c3a8fc1683a5 # v0.5.139 | |
| with: | |
| command: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |