diff --git a/.github/workflows/_node-env.yml b/.github/workflows/_node-env.yml index e37648a..813648a 100644 --- a/.github/workflows/_node-env.yml +++ b/.github/workflows/_node-env.yml @@ -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' diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 5ef7f21..b5acc7e 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -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 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 06b9fdb..6b860cc 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -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 @@ -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 @@ -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