Skip to content

ci: release without pushing back to main - #7

Merged
neilwashere merged 1 commit into
mainfrom
ci/release-without-push
Aug 1, 2026
Merged

ci: release without pushing back to main#7
neilwashere merged 1 commit into
mainfrom
ci/release-without-push

Conversation

@neilwashere

Copy link
Copy Markdown
Contributor

Prerequisite for protecting main.

Why

A required status check rejects any direct push to the protected branch,
including the chore(release): commit semantic-release makes — and including one
authenticated with a PAT:

remote: error: 9 of 9 required status checks are expected.
 ! [remote rejected] HEAD -> main (protected branch hook declined)

semantic-release's own maintainers are explicit that it "cannot perform any magic
to bypass those rules on its own"
(discussion #2450).
So the release commit has to go, or protection can't.

Losing it costs nothing here: pi resolves a git-installed package by commit SHA
(gitHasAvailableUpdate in core/package-manager.js), and only ever reads
package.json.version for npm sources. The version bump was invisible to every
consumer of this package.

What

  • Drop @semantic-release/git and @semantic-release/changelog (config + devDeps).
  • Delete CHANGELOG.md — nothing would update it, and a stale changelog is worse
    than none. GitHub Release notes are the changelog.
  • Correct the install docs: ref-less installs track main (pi hard-resets the
    clone to origin/main each update), they are not pinned. Only @vX.Y.Z pins.
    The old wording claimed all refs were pins.

Tags and Releases are unaffected by branch protection, so the pipeline is otherwise
unchanged.

Verification

npm run check passes. npx semantic-release --dry-run loads and verifies the
trimmed plugin chain with no git/changelog steps.

Follow-up (not in this PR)

Protect main: require check (node 20) + check (node 24), require a PR,
strict: true, no force-push, no deletion.

Protecting main means required status checks reject any direct push to it,
including the release commit and including one made with a PAT, so
@semantic-release/git and @semantic-release/changelog cannot work here.

The GitHub Release notes become the changelog. Pi resolves a git-installed
package by commit SHA and never reads its package.json version, so the
in-repo bump was buying nothing.
@neilwashere
neilwashere merged commit a0052c3 into main Aug 1, 2026
3 checks passed
@neilwashere
neilwashere deleted the ci/release-without-push branch August 1, 2026 11:36
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant