ci(release): prepare v0.2.2 (#128) #120
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Lint, Test, Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24.3.0 | |
| cache: npm | |
| - name: Pin npm version | |
| run: npm i -g npm@11.4.2 | |
| - name: Resolve Chrome binary from runner | |
| id: chrome | |
| run: | | |
| CHROME_BIN_REAL="$(command -v google-chrome || command -v google-chrome-stable || command -v chromium || command -v chromium-browser || true)" | |
| if [[ -z "${CHROME_BIN_REAL}" ]]; then | |
| echo "Chrome binary not found on runner." | |
| exit 1 | |
| fi | |
| echo "chrome_bin=${CHROME_BIN_REAL}" >> "$GITHUB_OUTPUT" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lockfile drift gate | |
| run: git diff --exit-code package-lock.json | |
| - name: Lint | |
| run: npm run lint | |
| - name: Test | |
| env: | |
| CHROME_BIN_REAL: ${{ steps.chrome.outputs.chrome_bin }} | |
| run: | | |
| cat > /tmp/chrome-no-sandbox <<EOF | |
| #!/usr/bin/env bash | |
| exec "${CHROME_BIN_REAL}" --headless=new --disable-gpu --no-sandbox --disable-dev-shm-usage "\$@" | |
| EOF | |
| chmod +x /tmp/chrome-no-sandbox | |
| CHROME_BIN=/tmp/chrome-no-sandbox npm run test | |
| - name: Build libraries | |
| run: npm run build:libs | |
| - name: Version consistency | |
| run: npm run version:check | |
| changelog-gate: | |
| name: Changelog gate | |
| if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'auto-release') && !contains(github.event.pull_request.labels.*.name, 'release-pr') && !startsWith(github.event.pull_request.head.ref, 'chore/release/v') }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate Unreleased update for code changes | |
| run: | | |
| bash .github/scripts/check_unreleased_update.sh \ | |
| "${{ github.event.pull_request.base.sha }}" \ | |
| "${{ github.event.pull_request.head.sha }}" |