fix(ci): update publish workflow to use NPM_TOKEN authentication#141
Merged
Conversation
- Remove invalid --yes and --exact flags from npm version command - Switch from OIDC provenance to NPM_TOKEN secret authentication - Add contents:write and pull-requests:write permissions - Add step to create PR for version increment after publish Mirrors the working publish workflow from accordproject/concerto-cli. Co-Authored-By: Claude Opus 4.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the npm publish GitHub Actions workflow to unblock releases by adjusting the npm version/publish commands, switching authentication to an NPM_TOKEN secret, and adding automation to open a follow-up PR after publishing.
Changes:
- Remove invalid flags from the
npm versioninvocation and drop provenance-based publishing. - Authenticate to npm using
NPM_TOKENand broaden workflow permissions to enable repo/PR writes. - Add a
peter-evans/create-pull-requeststep to open a PR after publish.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -7,6 +7,8 @@ on: | |||
|
|
|||
| permissions: | |||
| id-token: write # Required for OIDC / npmjs publish | |||
Comment on lines
+46
to
+50
| - name: build and publish | ||
| run: | | ||
| npm version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }} | ||
| npm publish --access public --provenance ${{ steps.tag.outputs.tag }} 2>&1 | ||
| npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} | ||
| npm version --no-git-tag-version ${{ github.event.release.tag_name }} | ||
| npm publish --access public ${{ steps.tag.outputs.tag }} 2>&1 |
Comment on lines
+52
to
+66
| - name: Create PR to increment version | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| base: main | ||
| commit-message: 'chore(actions): publish ${{ github.event.release.tag_name }} to npm' | ||
| committer: GitHub <noreply@github.com> | ||
| author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
| signoff: true | ||
| branch: ap-publish-${{ github.event.release.tag_name }} | ||
| delete-branch: true | ||
| title: 'chore(actions): publish ${{ github.event.release.tag_name }} to npm' | ||
| body: | | ||
| # Increment Versions | ||
| Update the package.json version numbers after publishing to NPM. | ||
| assignees: ${{ github.actor }} |
Coverage Report for CI Build 25487779738Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 63.844%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--yesand--exactflags fromnpm versioncommandNPM_TOKENsecret authentication (matches concerto-cli)contents:writeandpull-requests:writepermissionsTest plan
NPM_TOKENsecret is configured in the repository🤖 Generated with Claude Code