Skip to content

Release

Release #577

Workflow file for this run

name: Release
on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
# Only run if CI succeeded for a push to main.
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build
env:
REDIS_URL: "redis://placeholder"
- name: Create release PR or publish
id: changesets
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
with:
publish: pnpm changeset publish
commit: "chore(release): version packages"
title: "chore(release): version packages"
commitMode: github-api
env:
NPM_CONFIG_PROVENANCE: "true"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Promote release branch
if: steps.changesets.outputs.published == 'true'
run: |
git fetch origin release
expected=$(git rev-parse origin/release)
git push --force-with-lease=refs/heads/release:$expected origin HEAD:refs/heads/release