Files
e2e/.github/workflows/release.yml
T

60 lines
2.0 KiB
YAML

name: release
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
# The repository's own runs are not usage: the CLI sends no telemetry from CI here.
env:
E2E_TELEMETRY_DISABLED: '1'
permissions:
contents: read
jobs:
release:
# GitHub-hosted, not Blacksmith: npm Trusted Publishing rejects OIDC
# tokens from self-hosted runners, and Blacksmith registers as one.
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
# OIDC for npm Trusted Publishing and provenance.
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: pnpm/action-setup@9fd676a19091d4595eefd76e4bd31c97133911f1 # v4.2.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 26
cache: pnpm
- run: pnpm install --frozen-lockfile
# No test gate here: `spec.yml` already covers every commit on `main`.
# Check main is green before merging the release PR. Peer ranges are the
# one thing the version bump rewrites, so they are checked again.
- name: Peer ranges
run: pnpm run check:peer-ranges
# Opens or updates a release PR while changesets are pending; publishes
# once that PR is merged and no changesets remain.
- name: Create release PR or publish
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
version-script: pnpm run version-packages
publish-script: pnpm run release
commit-message: 'chore: version packages'
pr-title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# No npm token: publishing uses Trusted Publishing (OIDC) configured
# on each @e2e-dev package. npm attaches provenance automatically
# once the repository is public.