ci: upgrade gh action to try fixing release [force release] #2337
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build, Test and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - beta | |
| - 8.x.x | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Linting | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| steps: | |
| - name: Cancel previous running workflows | |
| uses: fkirc/skip-duplicate-actions@master | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| - name: install dependencies | |
| run: yarn install --frozen-lockfile --non-interactive --production=false | |
| - name: Lint commit message | |
| uses: wagoid/commitlint-github-action@v2 | |
| - name: lint Javascript | |
| run: yarn lint | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Cache node_modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| - name: Run tests | |
| run: yarn test | |
| deploy: | |
| name: Release package | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/8.x.x' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false # GITHUB_TOKEN must not be set for the semantic release | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| - name: Build package | |
| run: yarn build | |
| - name: Semantic Release | |
| uses: cycjimmy/semantic-release-action@v6 | |
| id: semantic | |
| with: | |
| semantic_version: 17.3.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
| GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | |
| GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
| GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |