53c2e4503e
The prepare job was opening a release branch, creating a PR, and immediately squash-merging it via gh CLI. That pattern was carried over from the old release-pr.sh, but in this workflow it earns nothing: - main has no branch protection, so direct push is allowed. - The PR was force-merged in the same step (no `--auto`, no waiting for required checks), so it provided no pre-merge validation. - Discoverability is fine without a PR — git tag, GitHub release, workflow run, and main commit are all visible. The PR-and-merge sequence had ~5 GitHub API roundtrips, each a potential failure point, plus added 30+ lines of YAML and required pull-requests: write on the job. Replaced with a straight-line commit + tag + push: git fetch origin main && git checkout main && git reset --hard origin/main ... bump pkg.json, regen CHANGELOG, npm install ... git add ... && git commit && git tag -a && git push origin main "$TAG" Job permissions tightened to contents: write only. Race condition note: if main advances between fetch and push, the push fails non-fast-forward — same outcome as the old PR pattern, where the auto-merge would have failed. For workflow_dispatch releases with the maintainer actively driving, the race is essentially never going to happen, and the recovery (re-run the workflow) is the same. The dry-run path still bumps + regenerates CHANGELOG inside the runner so the maintainer can verify the computed values look right, just without committing or pushing anything.