Skip to content

chore(ci): add publish dry-run condition to release workflow #4389

chore(ci): add publish dry-run condition to release workflow

chore(ci): add publish dry-run condition to release workflow #4389

Workflow file for this run

name: CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch on Push and any branches on PR
push:
branches:
- main
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: "Lint on Ubuntu"
runs-on: ubuntu-latest
steps:
- name: Retrieve current Date Time in EST
shell: bash
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV
- name: Current datetime - ${{ env.START_TIME }}
run: echo ${{ env.START_TIME }}
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm itself
uses: pnpm/action-setup@v5
with:
run_install: false
- name: Set NodeJS
uses: actions/setup-node@v6
with:
node-version: 24
cache: "pnpm"
- name: Run pnpm install dependencies
run: pnpm install
- name: Linting (oxlint)
run: pnpm lint
- name: Formatting (oxfmt)
run: pnpm format:check
- name: Run TypeScript build only (no linting)
run: pnpm build
- name: Type-aware Linting (oxlint)
run: pnpm lint-type
tests:
strategy:
fail-fast: false
matrix:
node: [22, 24, 26]
platform: [ubuntu-latest]
name: "Unit Tests on Ubuntu / Node${{ matrix.node }}"
runs-on: ${{matrix.platform}}
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- name: Retrieve current Date Time in EST
shell: bash
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV
- name: Current datetime - ${{ env.START_TIME }}
run: echo ${{ env.START_TIME }}
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2 # codecov-bash seems to require this
- name: Install pnpm itself
uses: pnpm/action-setup@v5
- name: Set NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- run: node --version
- run: pnpm --version
- name: Run pnpm install dependencies
run: pnpm install
- name: Cache TypeScript and Vitest
uses: actions/cache@v5
with:
path: |
packages/*/lib
packages/*/tsconfig.tsbuildinfo
node_modules/.vitest
key: vitest-${{ matrix.platform }}-${{ matrix.node }}-${{ github.run_id }}
restore-keys: vitest-${{ matrix.platform }}-${{ matrix.node }}-
- name: Run full TypeScript build
run: pnpm build:full
- name: Run Vitest unit tests
if: |
!contains(github.event.head_commit.message, 'chore(release)')
env:
NO_COLOR: true
run: pnpm test
- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v6
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: |
contains(matrix.node, 24) &&
!contains(github.event.head_commit.message, 'chore(release)')
e2e:
strategy:
fail-fast: false
matrix:
node: [22, 24, 26]
platform: [ubuntu-latest]
name: "E2E Tests on Ubuntu / Node${{ matrix.node }}"
runs-on: ${{matrix.platform}}
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- name: Retrieve current Date Time in EST
shell: bash
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV
- name: Current datetime - ${{ env.START_TIME }}
run: echo ${{ env.START_TIME }}
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm itself
uses: pnpm/action-setup@v5 # stay on v5 until we upgrade to pnpm@11 (then update to v6)
- name: Set NodeJS
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- run: node --version
- run: pnpm --version
- name: Run pnpm install dependencies
run: pnpm install
- name: Cache TypeScript build
uses: actions/cache@v5
with:
path: |
packages/*/lib
packages/*/tsconfig.tsbuildinfo
key: e2e-build-${{ matrix.platform }}-${{ matrix.node }}-${{ github.run_id }}
restore-keys: e2e-build-${{ matrix.platform }}-${{ matrix.node }}-
- name: Run full TypeScript build
run: pnpm build:full
- name: Run E2E tests
if: |
!contains(github.event.head_commit.message, 'chore(release)')
env:
NO_COLOR: true
run: pnpm test:e2e