Skip to content

Prepare manual npm Trusted Publishing with OIDC - #2

Merged
gitdamnit merged 1 commit into
masterfrom
chore/npm-oidc-manual-publishing
Oct 30, 2026
Merged

gitdamnit merged 1 commit into
masterfrom
chore/npm-oidc-manual-publishing

Conversation

@gitdamnit

Copy link
Copy Markdown
Owner

What changes

  • Publish only on manual workflow dispatch; never on GitHub release or tag push.
  • Require a stable release tag and verify it matches package.json.
  • Check out that exact tag so publication never accidentally uses the current default branch.
  • Use GitHub-hosted Node 24, npm 11, and OIDC (id-token: write) instead of permanent NPM_TOKEN credentials.
  • Preserve existing build/test checks before publishing.

Safety / approval

This PR does not publish anything. Do not run the manual publishing workflow until the npm package's Trusted Publisher has been configured for this exact GitHub repository and publish.yml, and the maintainer separately approves publishing. For @gitdamnit/stranger-danger (not yet on npm), an initial authenticated bootstrap publication is required before npm will let us establish trust.

Review

Confirm workflows pass GitHub YAML/action validation, source tag is the released artifact, and npm ownership / OIDC prerequisites are satisfied before merge.

@gitdamnit
gitdamnit marked this pull request as ready for review October 30, 2026 00:03
@gitdamnit
gitdamnit merged commit 9988837 into master Oct 30, 2026
1 check passed
@gitdamnit
gitdamnit deleted the chore/npm-oidc-manual-publishing branch October 30, 2026 00:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T00:05:50.864163Z 38e096b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38e096bfcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- name: Checkout release tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Qualify the checkout ref as a tag

If a branch named v0.3.0 exists, this checkout selects that branch ahead of the identically named tag; it also accepts the branch when no such tag exists. The checkout v4 implementation checks branchExists before tagExists for unqualified refs. If the branch's package version matches, the subsequent version check passes and this workflow publishes branch contents rather than the requested release artifact. Use ref: refs/tags/${{ inputs.tag }} so checkout requires the exact tag and cannot resolve to a branch.

Useful? React with 👍 / 👎.

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