Skip to content

Commit

Permalink
fix: 优化 actions 13
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Mar 17, 2023
1 parent a684fae commit 99ec84b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/_node-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ on:

jobs:
node-env:
runs:
runs-on: ubuntu-latest
steps:
- run: sudo timedatectl set-timezone Asia/Shanghai
- run: timedatectl
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'
steps:
- run: sudo timedatectl set-timezone Asia/Shanghai
- run: timedatectl
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'
4 changes: 2 additions & 2 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ permissions:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/_node-env.yml
- run: npm ci
- run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/_node-env.yml
- run: npm ci
- run: npm run test
5 changes: 3 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/_node-env.yml
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -23,10 +24,10 @@ jobs:
release-type: node
bump-minor-pre-major: true
test:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.release_created
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/_node-env.yml
- run: npm ci
- run: npm run test
Expand All @@ -35,9 +36,9 @@ jobs:
api-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: coverage/lcov.info
publish:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/_node-env.yml
- run: npm ci
- run: npm run build
Expand Down

0 comments on commit 99ec84b

Please sign in to comment.