diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad32724..13ce122 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,19 +15,17 @@ jobs: - run: git config user.name github-actions[bot] - run: git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - name: Setup npm auth + run: | + echo "registry=https://registry.npmjs.org" >> ~/.npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc + - name: Use Node.js uses: actions/setup-node@v4 with: node-version: '20.x' cache: 'yarn' - - - name: Install dependencies - run: yarn --frozen-lockfile - - - name: Setup npm auth - run: | - echo "registry=https://registry.npmjs.org" >> ~/.npmrc - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc - - - name: Publish - run: yarn release + - run: yarn --frozen-lockfile + - run: yarn release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}