File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,13 +112,14 @@ jobs:
112112 echo "NPM tag: ${{ github.event.inputs.npm_tag }}"
113113 echo "Dry run: ${{ github.event.inputs.dry_run }}"
114114
115+ # Workaround: bun publish looks for .npmrc in $XDG_CONFIG_HOME, not $HOME
116+ # https://github.com/oven-sh/bun/issues/24124
115117 - name : Publish to NPM
116118 working-directory : ${{ env.CLI_PACKAGE_DIR }}
117119 env :
118- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
120+ XDG_CONFIG_HOME : ${{ runner.temp }}
119121 run : |
120- echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
121- bun publish --tag ${{ github.event.inputs.npm_tag }} ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
122+ bun publish --verbose --access public --tag ${{ github.event.inputs.npm_tag }} ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
122123
123124 - name : Create Git tag
124125 if : github.event.inputs.dry_run == 'false'
Original file line number Diff line number Diff line change @@ -117,12 +117,14 @@ jobs:
117117
118118 echo "✅ Safety check passed. Package name is safe to publish."
119119
120+ # Workaround: bun publish looks for .npmrc in $XDG_CONFIG_HOME, not $HOME
121+ # https://github.com/oven-sh/bun/issues/24124
120122 - name : Publish preview package
121123 env :
122124 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
125+ XDG_CONFIG_HOME : ${{ runner.temp }}
123126 run : |
124- echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
125- if bun publish --tag preview; then
127+ if bun publish --verbose --access public --tag preview; then
126128 echo "✅ Package published successfully"
127129 else
128130 echo "❌ Package publish failed"
You can’t perform that action at this time.
0 commit comments