diff --git a/.github/RELEASE_SETUP.md b/.github/RELEASE_SETUP.md index 3bcd968..fd0b4e7 100644 --- a/.github/RELEASE_SETUP.md +++ b/.github/RELEASE_SETUP.md @@ -49,8 +49,8 @@ This guide explains how to set up automatic publishing to Packagist using GitHub Releases are driven by [release-please](https://github.com/googleapis/release-please). The Releases section of `README.md` is the reference; the short version is that merging a PR with a conventional title updates a bot-authored Release PR, and merging that -Release PR runs the suite, creates the tag and the GitHub Release, and announces the tag -to Packagist. +Release PR, once a reviewer of the `release` environment approves the release run, +creates the tag and the GitHub Release and announces the tag to Packagist. ### Manual Publishing (if needed) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39cb18e..aa6a19e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,6 +183,8 @@ jobs: && (needs.tests.result == 'success' || needs.tests.result == 'skipped') }} runs-on: { group: github-public-amd64 } timeout-minutes: 5 + # A person approves every release before it is tagged, since Packagist reads a tag as soon as it exists. + environment: release permissions: contents: write issues: write diff --git a/README.md b/README.md index 2053794..125091c 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Releases are driven by [release-please](https://github.com/googleapis/release-pl - Its runs are created held at `action_required` until someone clicks **Approve and run**, because release-please opens the PR with `GITHUB_TOKEN`. The unit lane then reports `skipped` and `🧪 Tests` goes green without running a test. The skip only applies while the diff is nothing but what release-please writes, down to the version line in each version file, so a code or dependency change pushed onto a Release PR by hand runs the unit lane like any other PR. -- Merging the Release PR creates the tag and the GitHub Release on that merge commit and announces the tag to Packagist, with no further test run: the Release PR adds only the version bump and changelog to an already-tested `master`. A hotfix release from `N.x` runs the unit lane first, since its commits were pushed without a PR. A tag and a GitHub Release cannot be withdrawn. +- Merging the Release PR starts a release run that waits for a reviewer of the `release` environment to approve it. It then creates the tag and the GitHub Release on that merge commit and announces the tag to Packagist, with no further test run: the Release PR adds only the version bump and changelog to an already-tested `master`. A hotfix release from `N.x` runs the unit lane first, since its commits were pushed without a PR. A tag and a GitHub Release cannot be withdrawn. Packagist reads the tags itself, so the announce step only asks it to look now rather than on its own schedule. If it fails or the credentials are unset, the release still