Skip to content

fix(release): check out the docs job's tag by its release commit - #654

Merged
ixuz merged 1 commit into
mainfrom
fix/docs-job-tag-ref
Nov 8, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/docs-job-tag-ref

Conversation

@ixuz

@ixuz ixuz commented Nov 8, 2026

Copy link
Copy Markdown
Member

What and why

The release workflow's docs job checked out the version's tag by its bare name. For a bare name, the checkout action takes a branch of the same name before the tag, so the job could render, attest as made on main, and upload docs from a commit that is not the release.

  • The job now checks out main, reads the tag as refs/tags/<tag> only, checks with main's own release:commit script that it names that version's release commit on main, as the deploy does, and checks out that commit by its hash.
  • The check runs on every run of the job, so a draft is never published for a tag that fails it.
  • The deploy's lookup of the tag's commit is qualified the same way (refs/tags/$TAG^{commit}).
  • The shared refusal in scripts/releaseCommit.ts now fits both callers.
  • Tests cover the docs job's steps and a branch named like a tag beside the real one. docs/releasing.md and docs/deployment.md say how the tag is read.

The job has not run on GitHub with this change yet. A repository ruleset that refuses branch names matching v* would add a second layer, and is a setting for the maintainer.

Refs: GHSA-c67r-w75r-rjqx

The release workflow's docs job checked out the version's tag by its
bare name. For a bare name, the checkout action takes a branch of the
same name before the tag, so the job could render, attest as made on
main, and upload docs from a commit that is not the release.

The job now reads the tag as refs/tags/<tag> only, checks with main's
own release:commit script that it names that version's release commit
on main, as the deploy does, and checks out that commit by its hash.
The deploy's lookup of the tag's commit is qualified the same way.

Tests cover the docs job's steps and a branch named like a tag beside
the real one. The releasing and deployment docs say how the tag is
read.

Refs: GHSA-c67r-w75r-rjqx
@ixuz ixuz added bug Something isn't working ci/cd Continuous integration and deployment labels Nov 8, 2026
@ixuz
ixuz enabled auto-merge November 8, 2026 12:43
@ixuz
ixuz added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 7d907f3 Nov 8, 2026
51 checks passed
@ixuz
ixuz deleted the fix/docs-job-tag-ref branch November 8, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci/cd Continuous integration and deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant