Skip to content

Release

Release #840

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.0
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 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@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
with:
publish-script: pnpm changeset publish
commit-message: "chore(release): version packages"
pr-title: "chore(release): version packages"
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