Skip to content

chore(main): release 3.1.0 #133

chore(main): release 3.1.0

chore(main): release 3.1.0 #133

Workflow file for this run

name: CI
on:
push:
branches:
- main
- next
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
checks: write # needed for checks
id-token: write # needed for npm publish with provenance
contents: write # needed for github release
pull-requests: write # needed for coverage comment
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Lint
run: pnpm lint:ci
- name: Type Check
run: pnpm typecheck
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Type Check (built types)
run: pnpm test:types
- name: Test
run: pnpm test
# Creates and maintains a release PR; on merge to main it tags and creates a GitHub Release.
# Uses release-please-config.json and .release-please-manifest.json (manifest mode).
# See README "Release with Release Please" for setup instructions.
release:
name: Release
runs-on: ubuntu-latest
needs: [lint, test]
if: github.ref == 'refs/heads/main'
steps:
# https://github.com/googleapis/release-please-action
- name: Release Please
uses: googleapis/release-please-action@v5
with:
# https://github.com/googleapis/release-please-action?tab=readme-ov-file#github-credentials
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
# Prerelease (next) line, cut from the `next` branch. Isolated from the stable
# release above: it uses its OWN config and manifest (*.next.json) so the
# `next` branch never touches main's release-please files. Auto-merges the
# release PR so every push to `next` cuts a new prerelease (tag + GitHub
# Release flagged prerelease), which release.yml then publishes under the
# `next` dist-tag. Delete this job and the *.next.json files when the major
# lands on `main`.
release-next:
name: Release Next
runs-on: ubuntu-latest
needs: [lint, test]
if: github.ref == 'refs/heads/next'
steps:
# https://github.com/googleapis/release-please-action
- name: Release Please
id: release
uses: googleapis/release-please-action@v5
with:
# https://github.com/googleapis/release-please-action?tab=readme-ov-file#github-credentials
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
target-branch: next
config-file: release-please-config.next.json
manifest-file: .release-please-manifest.next.json
# Gated: GitHub auto-merge waits for the branch's required status checks
# before merging. Once merged, release-please tags + creates the GitHub
# release, which triggers the publish workflow.
- name: Enable auto-merge on the next release PR
if: ${{ steps.release.outputs.pr }}
env:
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
run: gh pr merge --squash --auto -R "${{ github.repository }}" "${{ fromJSON(steps.release.outputs.pr).number }}"