Skip to content

refactor: env runners #8857

refactor: env runners

refactor: env runners #8857

Workflow file for this run

name: ci
on:
push: { branches: [main] }
pull_request: { branches: [main] }
jobs:
tests-checks:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- run: pnpm install
- run: pnpm stub && pnpm lint
- run: pnpm test:types
tests-rollup:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@v1
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: v2.x }
- run: pnpm install
- run: pnpm stub && pnpm lint
if: ${{ matrix.os != 'windows-latest' }}
- run: pnpm test:types
if: ${{ matrix.os != 'windows-latest' }}
- run: pnpm build
- run: pnpm vitest run
env: { NITRO_BUILDER: rollup }
tests-rolldown:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@v1
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: v2.x }
- run: pnpm install
- run: pnpm build
- run: pnpm vitest run
env: { NITRO_BUILDER: rolldown }
publish-pkg-pr-new:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [tests-checks, tests-rollup, tests-rolldown]
steps:
- uses: actions/checkout@v6
with: { fetch-depth: 0 }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: "pnpm" }
- run: pnpm install
- run: pnpm build
- run: pnpm dlx pkg-pr-new publish || true
publish-nitro-nightly:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions: { id-token: write, contents: read }
needs: [tests-checks, tests-rollup, tests-rolldown]
if: contains('refs/heads/main', github.ref) && github.event_name == 'push'
steps:
- uses: actions/checkout@v6
with: { fetch-depth: 0 }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: "pnpm" }
- run: pnpm install
- run: pnpm build
- run: pnpm changelogen --bump -r 3.0.1 --canary nightly
- run: npm i -g npm@latest && npm publish --tag latest