Skip to content

feat: npm OIDC#73

Merged
davidlday merged 2 commits intomainfrom
feat/npm-oidc
Mar 26, 2026
Merged

feat: npm OIDC#73
davidlday merged 2 commits intomainfrom
feat/npm-oidc

Conversation

@davidlday
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 10:48
@davidlday davidlday merged commit 111e294 into main Mar 26, 2026
4 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an npm release/publish pipeline intended to support npm “trusted publishing” via GitHub OIDC: one workflow bumps/creates a release on main, and another publishes to npm when a v* tag is pushed.

Changes:

  • Add a new npm-release workflow that runs on main pushes and delegates to the reusable cz-bump-release workflow.
  • Rework npm-publish to run on v* tag pushes and publish via npm publish with OIDC (id-token: write) instead of token-based npm-bump.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/npm-release.yaml Adds a repo-triggered release workflow that calls the reusable commitizen bump/release workflow.
.github/workflows/npm-publish.yaml Switches publishing to tag-based triggers and uses OIDC permissions with direct npm publish steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

name: Bump, Release, and Publish
name: Publish to NPM

on:
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This workflow is no longer reusable: switching the trigger from workflow_call to push means downstream repos (and this repo’s own workflow-templates/npm-publish.yml) can’t uses: prosegrinder/.github/.github/workflows/npm-publish.yaml@... anymore. If the intent is to keep a reusable publish workflow, restore on: workflow_call (with the required secrets/inputs) and put the tag-triggered “starter” workflow in workflow-templates/ instead (or publish both entrypoints).

Suggested change
on:
on:
workflow_call:

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
permissions:
id-token: write
contents: read
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

permissions: id-token: write is granted workflow-wide, including the lint/test reusable jobs that don’t need OIDC. To follow least-privilege, move id-token: write to the publish job only (keep minimal read permissions at the workflow level if needed).

Copilot uses AI. Check for mistakes.
token: ${{ secrets.VERSION_BUMP_TAG_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v6.2.0
uses: actions/setup-node@v6
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This changes actions/setup-node from the previously pinned @v6.2.0 used elsewhere in this repo to the floating major @v6. For reproducibility (and to match the existing convention in other workflows here), pin this to a specific version (or ideally a commit SHA).

Suggested change
uses: actions/setup-node@v6
uses: actions/setup-node@v6.2.0

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +6
push:
branches:
- main
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This file is added under .github/workflows/ but is a repo-executed workflow (on: push) rather than a reusable workflow (on: workflow_call), unlike the other workflows in this directory. If this is intended as a starter workflow for consumers, it should live under workflow-templates/; if it’s intended to be reusable, switch it to workflow_call and provide a corresponding starter template that invokes it.

Suggested change
push:
branches:
- main
workflow_call:
secrets:
VERSION_BUMP_TAG_TOKEN:
required: true

Copilot uses AI. Check for mistakes.
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