Skip to content

Commit b6a4082

Browse files
authored
Merge pull request #69 from cloudcome/feat/v0.x
fix: 优化 actions 2
2 parents 6490733 + c24b6e5 commit b6a4082

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/code-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
LintAndTest:
17+
code-review:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- run: sudo timedatectl set-timezone Asia/Shanghai

.github/workflows/release-please.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
pull-requests: write
1111

1212
jobs:
13-
ReleasePR_or_ReleasePublish:
13+
release:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- run: sudo timedatectl set-timezone Asia/Shanghai
@@ -21,22 +21,24 @@ jobs:
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222
release-type: node
2323
bump-minor-pre-major: true
24+
25+
publish:
26+
needs: release
27+
if: needs.release.outputs.release_created
28+
steps:
2429
- uses: actions/checkout@v3
25-
if: steps.release.outputs.release_created
2630
- uses: actions/setup-node@v3
27-
if: steps.release.outputs.release_created
2831
with:
2932
node-version: 18
3033
cache: npm
31-
registry-url: https://registry.npmjs.org
32-
- run: npm ci && npm run test
33-
if: steps.release.outputs.release_created
34+
- run: npm ci
35+
- run: npm run test
3436
- uses: codacy/codacy-coverage-reporter-action@v1
3537
if: steps.release.outputs.release_created
3638
with:
3739
api-token: ${{ secrets.CODACY_API_TOKEN }}
3840
coverage-reports: coverage/lcov.info
39-
- run: npm run build && npm publish --registry=https://registry.npmjs.org
40-
if: steps.release.outputs.release_created
41+
- run: npm run build
42+
- run: npm publish --registry=https://registry.npmjs.org
4143
env:
4244
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)