Skip to content

fix(release): tag the source commit instead of the release commit - #8367

Merged
noomorph merged 1 commit into
yedidyak/github-actions-releasefrom
fix/release-tag-source-sha
Oct 20, 2026
Merged

noomorph merged 1 commit into
yedidyak/github-actions-releasefrom
fix/release-tag-source-sha

Conversation

@noomorph

@noomorph noomorph commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #8366. Merge into that branch or cherry-pick; whichever is easier for you.

Problem

finalize tags manifest.releaseSha, the commit that exists only on ci/update-version-X. This repo allows squash merge only, so that commit never reaches master. Consequences:

  • git tag --merged <master> (index.cjs, plan) never sees the new tag, so previousTag stays on 8.8.11 forever. Release notes grow with every release and the /commits/{sha}/pulls calls grow with them.
  • The legacy scripts/release.js tagged the source commit (8.8.11 -> 92e3bf13, equal to npm gitHead), so this was a behaviour change.

Change

  • Tag and GitHub release target_commitish use manifest.sourceSha. Publish already requires context.sha === sourceSha, so the tag now matches the npm provenance commit.
  • releaseSha is still used for the version branch and the version PR head.
  • New test fails without the change.
  • Docs: the stable example becomes 8.9.1 (npm latest is already 8.9.0, so the docs would reject 8.8.10); the line about approvals on the version PR now says that GITHUB_TOKEN events do not start Actions workflows.

Verification

node --test scripts/release/*.test.cjs: 28/28.

…commit

The release commit lives only on ci/update-version-X, which is squash-merged
(merge and rebase are disabled), so it never reaches master. Tagging it made
the tag unreachable from master: previousTag stuck on the last old tag and
release notes grew every release. The legacy scripts/release.js tagged the
source commit, which is also what npm provenance points at.

Also: docs example version, and Actions-created PRs do not trigger workflows.
@noomorph
noomorph requested a review from yedidyak October 19, 2026 18:17
@noomorph
noomorph merged commit d723eab into yedidyak/github-actions-release Oct 20, 2026
1 check passed
@noomorph
noomorph deleted the fix/release-tag-source-sha branch October 20, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant