From 79d19494466dfcc534f0713fb803949cec778bb1 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 30 Sep 2026 11:24:28 +0200 Subject: [PATCH] Add release-plz workflow Publish to crates.io through trusted publishing, and open release PRs that bump the version and changelog. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-plz.yml | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release-plz.yml diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..54b45a3 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,60 @@ +name: Release-plz + +on: + push: + branches: + - main + +jobs: + # Publishes to crates.io and creates the git tag and GitHub release when the + # version in Cargo.toml is not yet published. Authenticates to crates.io via + # trusted publishing, so no registry token is stored in the repository. + release-plz-release: + name: Release-plz release + if: github.repository_owner == 'MaterializeInc' + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + pull-requests: read + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Opens or updates the release PR that bumps the version and changelog. + release-plz-pr: + name: Release-plz PR + if: github.repository_owner == 'MaterializeInc' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + # Queues rather than cancels, so a push during a run is not skipped. + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}