From d2087ce7286e71c9cc3e68e99744ef9491c7d3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Thu, 16 May 2024 17:49:53 +0100 Subject: [PATCH] ci: Enable crates.io auto-release, but require certain people to approve the PRs (#1069) This setups a restricted ownership over the changelog files, so the release PRs by `release-please` or `release-plz` have to be approved by a restricted set of people. We can then enable auto-releases for rust (for python is already enabled). Feel free to suggest other users to add to the list. --- .github/CODEOWNERS | 5 +++++ .github/workflows/release-plz.yml | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b9e423831..e260a89b9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,3 +5,8 @@ # Add specific rules below. # Lower the rule, higher the precedence + +# The release PRs that trigger publication to crates.io or PyPI always modify the changelog. +# We require those PRs to be approved by someone with release permissions. +hugr/CHANGELOG.md @aborgna-q @ss2165 +hugr-py/CHANGELOG.md @aborgna-q @ss2165 diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index 25a08b1d9..8b724ff7e 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -23,7 +23,6 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Run release-plz uses: MarcoIeni/release-plz-action@v0.5 - with: - command: release-pr env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}