From cc0439e26ebff3ff510114efd20e5ee376c58dd8 Mon Sep 17 00:00:00 2001 From: Diego Davila Freitas Date: Thu, 26 Mar 2026 21:32:24 +0100 Subject: [PATCH] refactor: streamline npm registry authentication setup in publish workflow --- .gitea/workflows/publish.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index e8b49e8..48351dc 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -62,21 +62,16 @@ jobs: - name: Build binaries run: bun run binaries - - name: Configure npm registry auth - run: | - echo "registry=https://registry.npmjs.org" >> ~/.npmrc - echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc - cat >> ~/.bunfig.toml << EOF - [install.scopes] - "@0kmpo" = { registry = "https://registry.npmjs.org", token = "${NODE_AUTH_TOKEN}" } - EOF - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' - name: Publish to npm registry - run: bun publish --access public + run: npm publish --access public env: - BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create Gitea release and upload binaries run: |