Repository navigation
ci: changeset-driven Package Release workflow - #901
Open
cloudwebrtc wants to merge 16 commits into
Open
cloudwebrtc wants to merge 16 commits into
cloudwebrtc wants to merge 16 commits into
Conversation
cloudwebrtc
requested review from
changt,
lukasIO and
xianshijing-lk
as code owners
October 26, 2026 04:18
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
After tagging, create a GitHub Release per released package using its section of the release PR body (generated from the consumed changesets). RC versions are marked as pre-releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Look up the commit that added each changeset and the PR it belongs to, and append "(#123 by @user)" to its release-notes entry (short SHA when there is no PR). The bump job now fetches full history and passes GH_TOKEN so the lookup works in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Create releases with --draft in the tag job, and make each one public in its package's publish job right after the PyPI upload. A failed build or upload now leaves only a draft, never a public release for a version that is not on PyPI. Publish jobs now depend on tag and get contents: write for gh release edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pull_request events from forks get a read-only token even after merge, so the bump job could not push the release branch or open the release PR. Trigger it on push to main (plus workflow_dispatch) instead; release PR detection and publishing stay on pull_request: closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
detect trusted any merged PR whose branch started with release/. Also require a release/changesets-* branch from this repository, opened by github-actions[bot], so a hand-made release PR cannot trigger a publish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Changeset workflow that runs `changesets.py --check` on each PR push. It checks the PR merge result with the same rules the release uses (format, package names, bump types, conflicts, rc-only on non-main branches) without changing any file. Rename check() to validate() to free the name for the new flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a remind job (pull_request_target, no checkout of PR code) that comments once with a short format guide when a PR has no .changeset file, and deletes that comment once a changeset is added. Bot PRs and release PRs are skipped. The validate job now runs on pull_request only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Skip both the `validate` and `remind` jobs for PRs from `renovate/*` branches (dependency and security updates) - Don't post the missing-changeset reminder when a PR only changes dependency files: `*.lock` (e.g. `uv.lock`, `Cargo.lock`), `package.json` or `pnpm-lock.yaml`, in any directory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With validate and remind in one workflow triggered by both pull_request and pull_request_target, every PR got a second, skipped "Validate changesets" check, which could satisfy a required status check even when validation failed. The reminder now lives in changeset-reminder.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root pyproject.toml is the unpublished workspace config (dev tooling and security constraint floors), so a PR touching only it and uv.lock needs no changeset. Package pyproject.toml files still get the reminder since they declare published runtime dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Documents the changeset format and release flow, and keeps the .changeset/ directory in git once every pending changeset has been consumed by a release (the scripts and workflows ignore README.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This PR only changes CI and release tooling, so it shouldn't release any package. .changeset/README.md now keeps the directory in git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Fork test: Package Release pipelineRan the full flow end to end on cloudwebrtc/python-sdks, with the PyPI upload stubbed (one package set to succeed, one to fail) and docs jobs disabled. Nothing was uploaded to PyPI. Result: 16/16 scenarios passed. 3 issues were found; all are fixed on this branch.
Fixed during testing
Not covered: contributor fork PRs, real PyPI / Trusted Publisher, the rtc wheel build (no arm64 runner on the fork), branch protection. Before merging
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci: changeset-driven Package Release workflow
package-release.yml)main(merged PRs, including from forks) applies the pending.changeset/*.mdfiles and opens or updates a single release PR(
release/changesets-<base>) with the version bumps and release notespatch,minor,major,patch-rc,minor-rc,major-rc,next-rc,promote; packages:livekit-rtc,livekit-api,livekit-protocol.github/changesets.py: parses changesets, resolves the bump per package(largest wins), validates all of them before writing any file, then bumps
version.pyand removes the changesets it used(
`minor` Add a room helper (#123 by @user))version.pyit changed(more than one per release is possible) and tags each one; only release PRs
opened by the bump job (same repo,
github-actions[bot]) can trigger thisa draft and made public only after that package's PyPI upload succeeds
a manual workflow run
Changesetworkflow that validates changesets on every PR commitChangeset Reminderworkflow that comments once with a format guidewhen a PR has no changeset, and removes the comment once one is added. It
skips
renovate/*PRs and PRs that only touch dependency files (*.lock,package.json,pnpm-lock.yaml, rootpyproject.toml).changeset/README.mddocumenting the format and release flow