refactor: streamline npm registry authentication setup in publish workflow
All checks were successful
Lint / lint (pull_request) Successful in 14s

This commit is contained in:
2026-03-26 21:32:24 +01:00
parent d78bc303fa
commit cc0439e26e

View File

@@ -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: |