From bef504db38bc1103aa3a5973bc66ce001dca0da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=23=E4=BA=91=E6=B7=A1=E7=84=B6?= Date: Fri, 17 Mar 2023 03:47:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20actions=2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/code-review.yml | 3 ++- .github/workflows/release-please.yml | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index c064991..4e2df0c 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -22,8 +22,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: .nvmrc cache: npm + cache-dependency-path: '**/package-lock.json' - run: npm ci - run: npm run lint - run: npm run test diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d711197..252dd2d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -34,11 +34,10 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: .nvmrc cache: npm + cache-dependency-path: '**/package-lock.json' registry-url: https://registry.npmjs.org - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm ci - run: npm run test - uses: codacy/codacy-coverage-reporter-action@v1 @@ -48,7 +47,15 @@ jobs: coverage-reports: coverage/lcov.info - run: npm run build - run: npm publish --registry=https://registry.npmjs.org + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - uses: jaywcjlove/github-action-package@main id: pkg - run: curl --silent -X PUT https://registry-direct.npmmirror.com/${{ steps.pkg.outputs.name }}/sync?sync_upstream=true name: Sync the new version to npmmirror.com + - uses: actions/setup-node@v3 + with: + registry-url: https://npm.pkg.github.com + - run: npm publish --registry=https://npm.pkg.github.com + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}