Skip to content

Commit fe93f88

Browse files
authored
Merge pull request #82 from cloudcome/feat/v0.x
fix: 优化 actions 10
2 parents 827d1d3 + bef504d commit fe93f88

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/code-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- uses: actions/setup-node@v3
2424
with:
25-
node-version: 18
25+
node-version-file: .nvmrc
2626
cache: npm
27+
cache-dependency-path: '**/package-lock.json'
2728
- run: npm ci
2829
- run: npm run lint
2930
- run: npm run test

.github/workflows/release-please.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ jobs:
3434
- uses: actions/checkout@v3
3535
- uses: actions/setup-node@v3
3636
with:
37-
node-version: 18
37+
node-version-file: .nvmrc
3838
cache: npm
39+
cache-dependency-path: '**/package-lock.json'
3940
registry-url: https://registry.npmjs.org
40-
env:
41-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4241
- run: npm ci
4342
- run: npm run test
4443
- uses: codacy/codacy-coverage-reporter-action@v1
@@ -48,7 +47,15 @@ jobs:
4847
coverage-reports: coverage/lcov.info
4948
- run: npm run build
5049
- run: npm publish --registry=https://registry.npmjs.org
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5152
- uses: jaywcjlove/github-action-package@main
5253
id: pkg
5354
- run: curl --silent -X PUT https://registry-direct.npmmirror.com/${{ steps.pkg.outputs.name }}/sync?sync_upstream=true
5455
name: Sync the new version to npmmirror.com
56+
- uses: actions/setup-node@v3
57+
with:
58+
registry-url: https://npm.pkg.github.com
59+
- run: npm publish --registry=https://npm.pkg.github.com
60+
env:
61+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)