Skip to content

Commit b0b85d2

Browse files
refactor: Configure npm for GitHub Packages without NPM_TOKEN
Replace NPM_TOKEN environment variable with explicit npm configuration using npm config commands. This is cleaner and more explicit about using GitHub Packages authentication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 6bc6ea8 commit b0b85d2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/actions/semantic-release/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ runs:
7878
echo "::endgroup::"
7979
echo ""
8080
81+
- name: Configure npm for GitHub Packages
82+
if: inputs.publishToNpm == 'true'
83+
shell: bash
84+
run: |
85+
npm config set @cloudbeds:registry https://npm.pkg.github.com
86+
npm config set //npm.pkg.github.com/:_authToken ${{ inputs.GITHUB_TOKEN }}
87+
8188
- name: Create config file for Semantic Release
8289
uses: actions/github-script@v7
8390
with:
@@ -140,7 +147,6 @@ runs:
140147
${{ env.EXTRA_PLUGINS }}
141148
env:
142149
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
143-
NPM_TOKEN: ${{ inputs.GITHUB_TOKEN }}
144150
HUSKY: '0'
145151

146152
- name: Output commit hash

0 commit comments

Comments
 (0)