Skip to content

Commit f2cd644

Browse files
lukasIOclaude
andauthored
chore: release packages with verwalter instead of changesets/action (#784)
* Release with verwalter instead of changesets/action Add verwalter.toml and the four verwalter workflows (release PR, release, pre-release, changeset check). Remove the changesets/action job from CI, .changeset/config.json, the ci:publish script and the changesets devDependencies. Pending .changeset/*.md files carry over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review: rc releases, stale scripts, docs failures Run the release workflow for verwalter PRs on any base branch, so an rc PR from another branch is tagged and published. Remove the server SDK's changeset and ci:publish scripts. Let a failed docs build or upload fail the publish job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Upload the server SDK docs only for a stable version An rc release must not replace the docs of the current stable release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Release: docs in their own job, one publish at a time A docs failure no longer turns the publish job red after npm has the version. A publish job waits for a running one instead of publishing the same version twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Release: guard source on runs by hand, narrow docs, queue publishes - Add a ref input for runs by hand. Before the build, fail when a package to publish differs from its release tag. - Upload the server SDK docs only when this run released a final server SDK version from main. - Keep every waiting publish run with queue: max. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Release: drop the source guard step The next verwalter release checks in publish that each package matches its tag (livekit/verwalter#105). Until then, a run by hand sets ref to the tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Release: verwalter v0.31.0, verify the end state v0.31.0 checks in publish that each package matches its tag, so the note about v0.30.0 goes. A verify job runs status --check after the publish, as in the upstream example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Release: build before the tag A build job runs first and uploads the build output. A build that fails now stops the run before release creates any tag. publish and docs use that output instead of building after the tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent bb8b7b8 commit f2cd644

10 files changed

Lines changed: 297 additions & 397 deletions

File tree

‎.changeset/config.json‎

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Fails a contributor PR that changes a versioned package without a
6+
# changeset, with a comment that links to a prefilled changeset file.
7+
# The `internal` label skips the check.
8+
name: Changeset check
9+
10+
on:
11+
pull_request:
12+
types: [opened, synchronize, reopened, labeled, unlabeled]
13+
branches: [main]
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
jobs:
20+
check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24+
- uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
25+
with:
26+
command: check

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ env:
55
CARGO_TERM_COLOR: always
66

77
permissions:
8-
id-token: write # Required for OIDC
9-
contents: write # Required to create GH releases
10-
pull-requests: write # Required to interact with PRs
8+
contents: read
119

1210
on:
1311
workflow_dispatch:
@@ -90,47 +88,3 @@ jobs:
9088
bun install
9189
(cd packages/livekit-server-sdk && EXPECT_BUN_RUNTIME=1 bun --bun run test)
9290
(cd packages/livekit-rtc && EXPECT_BUN_RUNTIME=1 bun --bun run test)
93-
94-
build_and_release:
95-
if: github.ref == 'refs/heads/main'
96-
name: Build and release
97-
runs-on: ubuntu-latest
98-
steps:
99-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
100-
101-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
102-
103-
- name: Setup node
104-
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
105-
with:
106-
node-version: 24
107-
cache: pnpm
108-
109-
- name: Install dependencies
110-
run: pnpm install
111-
112-
- name: Build server SDK
113-
run: pnpm --filter="livekit-server-sdk" build
114-
115-
- name: Build rtc-node
116-
run: pnpm --filter="@livekit/rtc-node" build
117-
118-
- name: Create Release Pull Request or Publish to npm
119-
id: changesets
120-
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
121-
with:
122-
publish-script: pnpm ci:publish
123-
env:
124-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125-
126-
- name: Build Server SDK Docs
127-
if: steps.changesets.outputs.published == 'true'
128-
run: pnpm --filter=livekit-server-sdk build-docs
129-
130-
- name: S3 Upload Server SDK Docs
131-
if: steps.changesets.outputs.published == 'true'
132-
run: aws s3 cp packages/livekit-server-sdk/docs/ s3://livekit-docs/server-sdk-js --recursive
133-
env:
134-
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
135-
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
136-
AWS_DEFAULT_REGION: 'us-east-1'

‎.github/workflows/pre-release.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# On demand: open an rc PR from the branch the workflow is run on. The
6+
# levels come from the changesets. Merging the PR tags 1.6.0-rc.1; the
7+
# next run numbers rc.2. Changesets stay pending for the final release.
8+
name: Pre-release PR
9+
10+
on:
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
pr:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
with:
23+
fetch-depth: 0 # the tags number the rc
24+
- uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
25+
with:
26+
command: pre-release
27+
args: --target ${{ github.ref_name }}
28+
app-client-id: ${{ secrets.VERWALTER_RELEASE_CLIENT_ID }}
29+
app-private-key: ${{ secrets.VERWALTER_RELEASE_APP_KEY }}

‎.github/workflows/release-pr.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Keeps one release PR open while changesets are pending. Runs on every
6+
# push to main and regenerates the release branch from main.
7+
name: Release PRs
8+
9+
on:
10+
push:
11+
branches: [main]
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
concurrency:
18+
group: release-prs
19+
cancel-in-progress: true
20+
21+
jobs:
22+
pr:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26+
with:
27+
fetch-depth: 0 # the commit that added a changeset gives its changelog line the PR and author
28+
- uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
29+
with:
30+
command: pr
31+
# A GitHub App token lets the release PRs trigger CI; the default
32+
# github.token does not. Without these secrets, github.token is used.
33+
app-client-id: ${{ secrets.VERWALTER_RELEASE_CLIENT_ID }}
34+
app-private-key: ${{ secrets.VERWALTER_RELEASE_APP_KEY }}

‎.github/workflows/release.yml‎

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# After a release PR merges: tag and create the GitHub releases, then
6+
# publish to npm. The step that cannot be undone comes last.
7+
name: Release
8+
9+
on:
10+
# Any base branch: an rc PR from `pre-release` targets the branch it
11+
# was run on. The bot and marker check on the job gates the run.
12+
pull_request:
13+
types: [closed]
14+
# A failed job is re-run with "Re-run failed jobs" on the run itself:
15+
# that keeps the merge commit. Run by hand only for a fixed workflow
16+
# file, with `ref` set to the release tag. `verwalter release` resumes
17+
# from the current state and skips what is done. With `package`, that
18+
# package is reported again even when complete, so the publish job and
19+
# the docs job run for it.
20+
workflow_dispatch:
21+
inputs:
22+
ref:
23+
description: Commit or tag to release and publish. Set it to the release tag. Empty is the branch head.
24+
required: false
25+
default: ''
26+
package:
27+
description: Only this package; always reported to the publish job.
28+
required: false
29+
default: ''
30+
31+
permissions:
32+
contents: write
33+
id-token: write # trusted publishing
34+
35+
jobs:
36+
# Build before the tag: a build that fails stops the run before
37+
# anything is public. The publish and docs jobs use this build.
38+
build:
39+
# Only a release PR the tool opened: the branch prefix alone would let
40+
# any pushed `release/*` branch trigger a publish.
41+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.user.login == 'verwalter-release[bot]' && contains(github.event.pull_request.body, '<!-- verwalter release -->'))
42+
runs-on: ubuntu-latest
43+
permissions:
44+
contents: read
45+
steps:
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47+
with:
48+
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
49+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
50+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
51+
with:
52+
node-version: 24
53+
cache: pnpm
54+
- run: pnpm install
55+
- name: Build server SDK
56+
run: pnpm --filter="livekit-server-sdk" build
57+
- name: Build rtc-node
58+
run: pnpm --filter="@livekit/rtc-node" build
59+
# The build output, and the generated version file that both
60+
# packages ship in `src`.
61+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
62+
with:
63+
name: build
64+
if-no-files-found: error
65+
path: |
66+
packages/livekit-server-sdk/dist
67+
packages/livekit-server-sdk/src/version.ts
68+
packages/livekit-rtc/dist
69+
packages/livekit-rtc/src/version.ts
70+
71+
release:
72+
needs: build
73+
runs-on: ubuntu-latest
74+
outputs:
75+
released: ${{ steps.verwalter.outputs.released }}
76+
releases: ${{ steps.verwalter.outputs.releases }}
77+
steps:
78+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
79+
with:
80+
# The merge commit itself: a push to main right after the merge
81+
# must not move the tags.
82+
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
83+
fetch-depth: 0
84+
- id: verwalter
85+
uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
86+
with:
87+
command: release
88+
args: ${{ inputs.package && format('--package {0}', inputs.package) || '' }}
89+
90+
publish:
91+
needs: release
92+
if: needs.release.outputs.released == 'true' || github.event_name == 'workflow_dispatch'
93+
runs-on: ubuntu-latest
94+
# One publish at a time, in arrival order. A waiting publish checks out
95+
# after the running one ends, so it sees the newer tag and picks the
96+
# right npm dist-tag. `queue: max` keeps every waiting run: without it,
97+
# a third run cancels the waiting one.
98+
concurrency:
99+
group: npm-publish
100+
cancel-in-progress: false
101+
queue: max
102+
permissions:
103+
contents: write # the tool flips draft releases after the publish
104+
id-token: write # trusted publishing
105+
steps:
106+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
107+
with:
108+
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
109+
fetch-depth: 0 # tags decide what is published
110+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
111+
# No registry-url: npm trusted publishing needs no token, and the
112+
# placeholder token setup-node writes would make the publish fail.
113+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
114+
with:
115+
node-version: 24 # npm 11.5.1 or later is required for OIDC
116+
cache: pnpm
117+
- run: pnpm install
118+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
119+
with:
120+
name: build
121+
path: packages
122+
- uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
123+
env:
124+
GH_TOKEN: ${{ github.token }}
125+
with:
126+
command: publish
127+
releases: ${{ needs.release.outputs.releases }}
128+
129+
# The end state, asserted: `status --check` fails when a tag is not on
130+
# the remote, a GitHub release is missing or still a draft, or npm does
131+
# not have the version. A step that was skipped without an error ends here.
132+
verify:
133+
needs: publish
134+
runs-on: ubuntu-latest
135+
permissions:
136+
contents: write # reads only. A draft release is visible only with write access
137+
steps:
138+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
139+
with:
140+
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
141+
fetch-depth: 0
142+
- uses: livekit/verwalter@39e3d7c57c2b6d96cf2d4b7771f3ab199490faba # v0.31.0
143+
with:
144+
command: status
145+
args: --check
146+
147+
# Its own job: a docs failure is red, and the publish job stays green,
148+
# so it is clear that the release is complete. A re-run is safe.
149+
# The docs site holds one version, the newest final server SDK release
150+
# from main. An rc, another branch, or a release of rtc-node alone must
151+
# not replace it.
152+
docs:
153+
needs: [release, publish]
154+
if: success() && (github.event.pull_request.base.ref == 'main' || github.ref == 'refs/heads/main')
155+
runs-on: ubuntu-latest
156+
permissions:
157+
contents: read
158+
steps:
159+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
160+
with:
161+
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
162+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
163+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
164+
with:
165+
node-version: 24
166+
cache: pnpm
167+
- name: Check for a final server SDK release
168+
id: docs
169+
env:
170+
RELEASES: ${{ needs.release.outputs.releases }}
171+
run: |
172+
if jq -e 'any(.[]; .package == "livekit-server-sdk" and .prerelease == false)' <<< "${RELEASES:-[]}" >/dev/null; then
173+
echo "stable=true" >> "$GITHUB_OUTPUT"
174+
fi
175+
- if: steps.docs.outputs.stable == 'true'
176+
run: pnpm install
177+
# The build job's output has src/version.ts, which the docs need.
178+
- if: steps.docs.outputs.stable == 'true'
179+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
180+
with:
181+
name: build
182+
path: packages
183+
- name: Build Server SDK Docs
184+
if: steps.docs.outputs.stable == 'true'
185+
run: pnpm --filter=livekit-server-sdk build-docs
186+
- name: S3 Upload Server SDK Docs
187+
if: steps.docs.outputs.stable == 'true'
188+
run: aws s3 cp packages/livekit-server-sdk/docs/ s3://livekit-docs/server-sdk-js --recursive
189+
env:
190+
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
191+
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
192+
AWS_DEFAULT_REGION: 'us-east-1'

‎package.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"build": "turbo run build",
99
"build:livekit-rtc": "turbo run build --filter=@livekit/rtc-node...",
1010
"build:artifacts": "turbo run artifacts --filter=@livekit/rtc-node...",
11-
"ci:publish": "changeset publish",
1211
"api:check": "turbo run api:check",
1312
"api:update": "turbo run api:update",
1413
"format:check": "prettier --check \"**/src/**/*.{ts,tsx,md,json}\"",
@@ -19,8 +18,6 @@
1918
"test:watch": "vitest"
2019
},
2120
"devDependencies": {
22-
"@changesets/cli": "^3.0.0",
23-
"@livekit/changesets-changelog-github": "^0.2.0",
2421
"@rushstack/heft": "^0.74.5",
2522
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
2623
"@typescript-eslint/eslint-plugin": "^8.60.1",

‎packages/livekit-server-sdk/package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
"build": "tsup --onSuccess \"tsc -p tsconfig.json --declaration --emitDeclarationOnly --skipLibCheck\"",
3535
"build:watch": "tsc --watch",
3636
"build-docs": "typedoc",
37-
"changeset": "changeset",
38-
"ci:publish": "pnpm build && changeset publish",
3937
"lint": "eslint src",
4038
"format": "prettier --write src",
4139
"format:check": "prettier --check src",
@@ -49,9 +47,7 @@
4947
"jose": "^5.1.2"
5048
},
5149
"devDependencies": {
52-
"@changesets/cli": "^3.0.0",
5350
"@edge-runtime/vm": "^5.0.0",
54-
"@livekit/changesets-changelog-github": "^0.2.0",
5551
"@types/node": "^20.10.1",
5652
"happy-dom": "^21.0.0",
5753
"prettier": "^3.0.0",

0 commit comments

Comments
 (0)