Skip to content

[XELP] Fail early on a tag collision in the npm release - #5

Merged
ljunkie merged 1 commit into
xelp/mainfrom
rob/npm-release-followups
Aug 28, 2026
Merged

[XELP] Fail early on a tag collision in the npm release#5
ljunkie merged 1 commit into
xelp/mainfrom
rob/npm-release-followups

Conversation

@ljunkie

@ljunkie ljunkie commented Aug 28, 2026

Copy link
Copy Markdown
Member

Follow ups from the review on #4, now that the package access is granted and working.

The publish runs before the tag is pushed, and a published version cannot be replaced, so
a tag that already exists would only be discovered after the package had shipped, leaving
a release that no re-run can tag. The shadow release used the same version scheme, so its
tags are real candidates for that collision. The preflight now checks for the tag as well
as the published version.

Drops the GH_TOKEN fallback from the install step. Reading another repository's package
is granted through that package's Manage Actions access, which makes GITHUB_TOKEN
sufficient, and no organization secret reaches this fork, so the fallback could never have
resolved to anything.

Also makes packages: read explicit in CI rather than relying on a repository default, and
stops describing the dry run as packing when it only reports what would be packed.

The publish runs before the tag is pushed, and a published version cannot be
replaced, so a tag that already exists would be discovered only after the
package had shipped, leaving a release that no re-run can tag. The shadow
release used this same version scheme, so its tags are real candidates. Check
for the tag in the same preflight that checks the published version.

Reading a dependency from another repository's package is granted through that
package's Manage Actions access, which makes GITHUB_TOKEN sufficient. No
organization secret reaches these forks, so the GH_TOKEN fallback could never
have resolved to anything, and its presence only suggested otherwise.

Also state explicitly that CI needs packages: read, rather than depending on a
repository default that an organization can tighten, and stop describing the dry
run as packing when it only reports what would be packed.
Copilot AI lite review requested due to automatic review settings August 28, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions release workflow for the XELP npm package to fail early when a release would be impossible to tag, and tightens CI permissions/documentation around GitHub Packages access.

Changes:

  • Add a preflight check that aborts the release if the computed git tag already exists (before publishing).
  • Remove the GH_TOKEN fallback from the release workflow’s dependency install step and clarify package-access requirements in comments.
  • Make packages: read explicit in CI, and rename the dry-run “pack” step to reflect npm pack --dry-run behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/xelp_npm_release.yml Adds remote tag collision preflight and simplifies release workflow auth/token usage and messaging.
.github/workflows/build.yml Adds explicit job permissions for GitHub Packages reads during npm ci.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/build.yml
@ljunkie
ljunkie merged commit 23f1bcf into xelp/main Aug 28, 2026
4 checks passed
@ljunkie
ljunkie deleted the rob/npm-release-followups branch August 28, 2026 06:24
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.

2 participants