diff --git a/.github/workflows/pre_release.yaml b/.github/workflows/pre_release.yaml index 8c675f5..321ab83 100644 --- a/.github/workflows/pre_release.yaml +++ b/.github/workflows/pre_release.yaml @@ -36,7 +36,7 @@ jobs: with: ref: ${{ github.ref }} repo-token: ${{ secrets.GITHUB_TOKEN }} - check-name: 'Lint' + check-regexp: (Build & Test .*|Lint|Docs build) wait-interval: 5 update_changelog: @@ -87,11 +87,13 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 + cache: 'npm' + cache-dependency-path: 'package-lock.json' - name: Install dependencies run: | echo "access=public" >> .npmrc echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc - npm install + npm ci - # Check version consistency and increment pre-release version number for beta only. name: Bump pre-release version run: node ./.github/scripts/before-beta-release.cjs diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 47674cd..93f70b6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -43,8 +43,19 @@ jobs: custom_version: ${{ inputs.custom_version }} existing_changelog_path: CHANGELOG.md + wait_for_checks: + name: Wait for code checks to pass + runs-on: ubuntu-latest + steps: + - uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.ref }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + check-regexp: (Build & Test .*|Lint|Docs build) + wait-interval: 5 + update_changelog: - needs: [ release_metadata ] + needs: [ release_metadata, wait_for_checks ] name: Update changelog runs-on: ubuntu-latest outputs: @@ -106,6 +117,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 + cache: 'npm' + cache-dependency-path: 'package-lock.json' - name: Install dependencies run: | echo "access=public" >> .npmrc