diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index a6b0b940..30903761 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -8,9 +8,9 @@ name: release-please # It uses the job's own GITHUB_TOKEN: created for this run, gone when it ends, so there is no stored secret to protect. # Only this job gets write access: to push the release pull request's branch and publish the release (contents), to # open and update that pull request (pull requests), and to label it (issues). The token cannot push to main past the -# branch rules. GitHub holds the workflow runs of a pull request this token opens or updates until someone with write -# access clicks "Approve workflows to run" on it, so a maintainer approves the release pull request's checks before -# merging it. +# branch rules. For what this token does, GitHub creates no pr-guard run (pull_request_target) and holds the other +# checks for approval, so a maintainer closes and reopens the release pull request: that event is theirs, and every +# check runs, pr-guard included (app/README.md, Releasing). # .github/scripts/workflows.test.mjs keeps this file to exactly that. on: diff --git a/app/README.md b/app/README.md index d5c1b94f..85b5cbc5 100644 --- a/app/README.md +++ b/app/README.md @@ -50,11 +50,13 @@ version and commit. 1. After each merge, release-please keeps one pull request titled `chore: release X.Y.Z` up to date: the version in `package.json` and `package-lock.json`, and the new `CHANGELOG.md` entry. Edit the notes there if needed; they are public: no hostnames, secrets, wallet keys or unfixed vulnerabilities. -2. A maintainer approves its checks: GitHub holds the workflow runs of a pull request that release-please's token opens - or updates until someone with write access clicks **Approve workflows to run** on it. Then the maintainer approves the - pull request (pr-guard asks for an owner's approval), re-runs `pr-guard` (it reads approvals only when it runs, see - CONTRIBUTING.md), and merges once it passes. release-please tags the merge commit `vX.Y.Z` and publishes the GitHub - Release. +2. A maintainer **closes and reopens** the release pull request, right away. For what release-please's token does, + GitHub creates no `pr-guard` run at all and holds the other checks for approval (seen on #150); a reopen by a + maintainer is their own event, so every check runs, `pr-guard` included. Before merging, check that the pull request + still carries its `autorelease: pending` label (release-please finds the merged release pull request by it; add it back + if it is missing). Then the maintainer approves the pull request (pr-guard asks for an owner's approval), re-runs + `pr-guard` (it reads approvals only when it runs, see CONTRIBUTING.md), and squash-merges it once it passes. + release-please tags the merge commit `vX.Y.Z` and publishes the GitHub Release. 3. Deploy, by hand, from an up-to-date `main` (`git pull`), at the repository root: `app/scripts/deploy.sh --dry-run`, then `app/scripts/deploy.sh`, both through the maintainers' checker below. `deploy.sh` refuses anything but a clean `main` equal to `origin/main` whose tag is on GitHub and whose release is published; it takes the contract addresses