From 5cd74febeb4a2c3291ad1d26a769e2321c00b835 Mon Sep 17 00:00:00 2001 From: Eason WaveKat Date: Wed, 8 Apr 2026 08:06:18 +1200 Subject: [PATCH] ci: add release-plz workflow Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release-plz.yml | 58 +++++++++++++++++++++++++++++++ release-plz.toml | 3 +- 2 files changed, 60 insertions(+), 1 deletion(-) 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..91acd96 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,58 @@ +name: Release-plz + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + release-plz-release: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + release-plz-pr: + needs: release-plz-release + if: always() + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: release-plz/action@v0.5 + id: release-plz + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Job summary + if: always() + run: | + echo "## Release PR" >> "$GITHUB_STEP_SUMMARY" + if [ "${{ steps.release-plz.outputs.prs_created }}" = "true" ]; then + echo "Release PR created." >> "$GITHUB_STEP_SUMMARY" + else + echo "No release PR created." >> "$GITHUB_STEP_SUMMARY" + fi diff --git a/release-plz.toml b/release-plz.toml index 066aebb..68387a3 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,2 +1,3 @@ [workspace] -changelog_config = "cliff.toml" +git_tag_enable = true +git_release_enable = true