chore: release v1.1.1 #86
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: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: short | |
| jobs: | |
| verify: | |
| name: Verify tag | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Tag must match workspace version | |
| run: | | |
| tag="${GITHUB_REF_NAME#v}" | |
| version=$(cargo metadata --format-version=1 --no-deps \ | |
| | jq -r '.packages[] | select(.name == "pallas") | .version') | |
| if [ "$tag" != "$version" ]; then | |
| echo "::error::Tag v$tag does not match workspace version $version" | |
| exit 1 | |
| fi | |
| ci: | |
| name: CI | |
| needs: verify | |
| uses: ./.github/workflows/ci.yml | |
| permissions: | |
| contents: read | |
| publish: | |
| name: Publish to crates.io | |
| needs: [verify, ci] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-release | |
| - name: Publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| # --isolated ignores [workspace.metadata.release], whose `publish = false` | |
| # (kept so local `cargo release <version>` only tags) would otherwise make | |
| # this a silent no-op. | |
| run: cargo release publish --workspace --execute --no-confirm --allow-branch HEAD --isolated | |
| github_release: | |
| name: Create GitHub Release | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate release notes | |
| id: git-cliff | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --latest --strip header | |
| env: | |
| OUTPUT: RELEASE.md | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: ${{ steps.git-cliff.outputs.changelog }} | |
| draft: true |