Skip to content

Enhance publish.yml with permissions and npm changes#111

Open
gracepark wants to merge 2 commits intogithub:mainfrom
gracepark:patch-1
Open

Enhance publish.yml with permissions and npm changes#111
gracepark wants to merge 2 commits intogithub:mainfrom
gracepark:patch-1

Conversation

@gracepark
Copy link
Copy Markdown

Part of: https://github.com/github/web-systems/issues/4309

Updated publish workflow to include permissions and modify npm publish commands as we've migrated to OIDC.

Updated publish workflow to include permissions and modify npm publish commands.
Copilot AI review requested due to automatic review settings May 5, 2026 19:25
@gracepark gracepark requested a review from a team as a code owner May 5, 2026 19:25
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

Updates the release workflow for @github/paste-markdown to support npm trusted publishing/OIDC and to adjust how packages are published from GitHub Actions. This fits into the codebase’s release automation by changing the workflow that publishes the package to npm and GitHub Packages.

Changes:

  • Added explicit job permissions, including id-token: write, to the publish jobs.
  • Replaced token-based npm publish commands with npm publish --provenance.
  • Removed the explicit NODE_AUTH_TOKEN environment wiring from the publish steps.
Show a summary per file
File Description
.github/workflows/publish.yml Updates npm/GitHub Packages release automation to use explicit permissions and new publish commands.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

.github/workflows/publish.yml:50

  • Using --ignore-scripts here skips prepublishOnly, so the GitHub Packages publish path will also upload an unbuilt package. In this repo the publishable contents come from dist/*, but this workflow never generates dist before calling npm publish.
        run: npm --ignore-scripts publish --provenance
  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread .github/workflows/publish.yml Outdated
- run: npm whoami; npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: npm --ignore-scripts publish --provenance
Comment on lines +29 to +31
permissions:
contents: read
id-token: write
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.

3 participants