refactor: streamline npm registry authentication setup in publish workflow #63
@@ -62,21 +62,16 @@ jobs:
|
|||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
run: bun run binaries
|
run: bun run binaries
|
||||||
|
|
||||||
- name: Configure npm registry auth
|
- name: Setup Node
|
||||||
run: |
|
uses: actions/setup-node@v4
|
||||||
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
|
with:
|
||||||
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
|
node-version: '20'
|
||||||
cat >> ~/.bunfig.toml << EOF
|
registry-url: 'https://registry.npmjs.org'
|
||||||
[install.scopes]
|
|
||||||
"@0kmpo" = { registry = "https://registry.npmjs.org", token = "${NODE_AUTH_TOKEN}" }
|
|
||||||
EOF
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish to npm registry
|
- name: Publish to npm registry
|
||||||
run: bun publish --access public
|
run: npm publish --access public
|
||||||
env:
|
env:
|
||||||
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Create Gitea release and upload binaries
|
- name: Create Gitea release and upload binaries
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user