From 9b203a8912bc9f943605a742d7406d84795b3af2 Mon Sep 17 00:00:00 2001 From: Yann Simon Date: Tue, 5 May 2026 13:16:39 +0200 Subject: [PATCH] integrate release-plz (#3739) --- .github/workflows/release-plz.yml | 57 +++++++++++++++++++++++++++++++ axum/release-plz.toml | 8 +++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/release-plz.yml create mode 100644 axum/release-plz.toml diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 00000000..a1b7095d --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,57 @@ +name: Release-plz + +on: + push: + branches: + - main + - v0.8.x + +jobs: + # Release unpublished packages. + release-plz-release: + name: Release-plz release + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'tokio-rs' }} + permissions: + contents: write + pull-requests: read + id-token: write + steps: + - &checkout + name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + fetch-depth: 0 + persist-credentials: false + - &install-rust + name: Install Rust toolchain + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable + with: + toolchain: stable + - name: Run release-plz + uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'tokio-rs' }} + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/axum/release-plz.toml b/axum/release-plz.toml new file mode 100644 index 00000000..691d34c9 --- /dev/null +++ b/axum/release-plz.toml @@ -0,0 +1,8 @@ +[workspace] +# Only release when the release PR is merged, not on every commit +# https://release-plz.dev/docs/config#the-release_always-field +release_always = false + +# Label release PRs for easy identification +# https://release-plz.dev/docs/config#the-pr_labels-field +pr_labels = ["release"]