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 }}