Bump version to 146.0.0 #590
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Build app | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| paths-ignore: | |
| - "*.md" | |
| - "*.txt" | |
| - "*.yml" | |
| - .editorconfig | |
| - ".github/**" | |
| - .gitignore | |
| - .npmignore | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "*.md" | |
| - "*.txt" | |
| - "*.yml" | |
| - .editorconfig | |
| - ".github/**" | |
| - .gitignore | |
| - .npmignore | |
| jobs: | |
| build: | |
| name: Build amd64 and arm64 | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["20.x", "22.x", "24.x", "25.x"] | |
| runner: ["windows-latest", "ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: | | |
| node --version | |
| npm --version | |
| npm ci | |
| name: Install npm dependencies | |
| - run: npm run lint . | |
| name: Lint | |
| if: startsWith(matrix.runner, 'ubuntu') | |
| - run: npm run typecheck | |
| name: Type check | |
| if: startsWith(matrix.runner, 'ubuntu') | |
| - run: ./test-driver.sh | |
| name: Verify install | |
| shell: bash | |
| - run: npm run test:ci | |
| name: Run tests | |
| continue-on-error: true | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: test-report-${{ matrix.runner }}-${{ matrix.node }} | |
| path: junit.xml | |
| if-no-files-found: error | |
| retention-days: 1 | |
| build_s390x: | |
| name: Build s390x | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["20", "22", "24"] # 25 is currently failing with missing shared library libatomic.so.1. See: https://github.com/giggio/node-chromedriver/actions/runs/18846584726/job/53772131575#step:3:329 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: uraimo/run-on-arch-action@v3 | |
| name: Verify install | |
| id: build | |
| with: | |
| arch: s390x | |
| distro: ubuntu24.04 | |
| env: | # this is just so we can cache each version | |
| GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}-${{ matrix.node }} | |
| dockerRunArgs: | | |
| --volume "$PWD:/app" | |
| githubToken: ${{ github.token }} | |
| install: | | |
| set -euo pipefail | |
| apt-get update | |
| apt-get -y install xz-utils curl libnss3 | |
| curl -fsSL --output sha https://nodejs.org/dist/latest-v${{ matrix.node }}.x/SHASUMS256.txt | |
| FULL_FILE=`grep 'node-v${{ matrix.node }}.*-linux-s390x.tar.gz' sha | tr -s ' ' | cut -d' ' -f2` | |
| NODE_VERSION=`echo $FULL_FILE | grep --color=never -Eo '[0-9]{2,}\.[0-9]{1,}\.[0-9]{1,}'` | |
| echo "Node version is $NODE_VERSION" | |
| ARCH=s390x | |
| curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" | |
| tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner | |
| rm sha | |
| rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" | |
| npm install -g npm@latest | |
| run: | | |
| node --version | |
| npm --version | |
| cd /app | |
| npm ci --no-progress | |
| BIN="./lib/chromedriver/chromedriver" | |
| if ! [ -e $BIN ]; then | |
| echo "Binary not found at $BIN" | |
| exit 1 | |
| fi | |
| build_proxy: | |
| name: Build with proxy | |
| runs-on: ubuntu-latest | |
| services: | |
| squid: | |
| image: ubuntu/squid:5.2-22.04_beta | |
| ports: | |
| - 3128:3128 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: | | |
| node --version | |
| npm --version | |
| export http_proxy=http://localhost:3128 https_proxy=http://localhost:3128 | |
| npm ci | |
| name: Install npm dependencies | |
| - run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y libnss3 | |
| name: Install OS dependencies | |
| - run: ./test-driver.sh | |
| name: Verify install | |
| build_local_file_install: | |
| name: Build with local file install | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: | | |
| node --version | |
| npm --version | |
| curl -fsSL --output /tmp/chromedriver-linux64.zip https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.105/linux64/chromedriver-linux64.zip | |
| export CHROMEDRIVER_FILEPATH=/tmp/chromedriver-linux64.zip | |
| npm ci | |
| name: Install npm dependencies | |
| - run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y libnss3 | |
| name: Install OS dependencies | |
| - run: ./test-driver.sh | |
| name: Verify install | |
| build_legacy: | |
| name: Build with legacy cdn url | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - run: | | |
| node --version | |
| npm --version | |
| export CHROMEDRIVER_VERSION=LATEST_113 | |
| npm ci | |
| name: Install npm dependencies | |
| - run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y libnss3 | |
| name: Install OS dependencies | |
| - run: ./test-driver.sh | |
| name: Verify install | |
| upload_pr_number: | |
| name: Upload PR number | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get PR number | |
| id: get-pr-number | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| echo "${{ github.event.number }}" > "pr-number.txt" | |
| - name: Upload PR number | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: pr-number | |
| path: "pr-number.txt" | |
| publish: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: [build, build_s390x, build_proxy] | |
| if: success() && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| registry-url: "https://registry.npmjs.org" | |
| - run: npm publish --provenance |