From b80c790df8f9f1ecb1f3b19ac4af2fab06e17e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=89=E8=8F=9C?= <1659488338@qq.com> Date: Thu, 22 Feb 2024 10:04:36 +0800 Subject: [PATCH] fix: add NODE_AUTH_TOKEN --- .github/workflows/build_deploy_docs.yml | 2 ++ .github/workflows/release.yml | 6 ++++-- .npmrc | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_deploy_docs.yml b/.github/workflows/build_deploy_docs.yml index 2631f89..571483a 100644 --- a/.github/workflows/build_deploy_docs.yml +++ b/.github/workflows/build_deploy_docs.yml @@ -16,6 +16,8 @@ jobs: node-version: 16 - name: Install run: npm install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Build run: npm run docs:build - name: Deploy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f03d9a8..c06ffcc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: release-type: node package-name: onebots # Checkout - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: ${{ steps.release.outputs.release_created }} # Setup node - uses: actions/setup-node@v3 @@ -26,6 +26,8 @@ jobs: if: ${{ steps.release.outputs.release_created }} # Install dependencies - run: npm install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} if: ${{ steps.release.outputs.release_created }} # Build output - run: npm run build @@ -34,4 +36,4 @@ jobs: - run: npm run pub env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ steps.release.outputs.release_created }} \ No newline at end of file + if: ${{ steps.release.outputs.release_created }} diff --git a/.npmrc b/.npmrc index ba70ebf..9771ede 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ +//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} @icqqjs:registry=https://npm.pkg.github.com +always-auth=true