Skip to content

Automate releases from webrtc-build - #62

Merged
cloudwebrtc merged 4 commits into
mainfrom
ci/release-automation
Nov 19, 2026
Merged

cloudwebrtc merged 4 commits into
mainfrom
ci/release-automation

Conversation

@cloudwebrtc

@cloudwebrtc cloudwebrtc commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Automates releases from webrtc-sdk/webrtc-build. Nothing has to be downloaded or uploaded by hand.

  • prepare-release runs on repository_dispatch: webrtc-release, which webrtc-build sends after publishing m<version>. It can also be started by hand with a version. It opens release/<version>, which:
    • bumps the version files;
    • links the webrtc-build release;
    • includes its list of webrtc commits.
  • release runs when that PR is merged:
    • downloads the binaries from the webrtc-build release;
    • verifies them against their .shasum files;
    • publishes them, with their .shasum files, as this repository's GitHub release;
    • then runs the existing publish step.

The version-bump logic lives in .github/scripts/prepare_release.py so it can be run locally.

Testing

Tested end to end in a fork against a test copy of webrtc-build: prepare-release, then merge, then release. The test fork has no publishing secrets, so the publish step was skipped there.

The repository_dispatch trigger itself is untested until the release GitHub App is configured in webrtc-build and installed on this repository.

Details

  • Files bumped: gradle.properties (VERSION_NAME), README.md, and CHANGES.md (including the webrtc commit the binaries were built from).
  • release uploads libwebrtc.aar, libwebrtc_prefixed.aar and libwebrtc_prefixed_stripped.aar, with their .shasum files, to v<version>. It then calls publish.yml, which still downloads them from that release.
  • publish.yml can now be called with a ref. It skips when the Nexus or signing secrets are missing (forks), and still runs on v* tags.
  • fetch-webrtc-artifacts.yml is no longer needed once this is in use, and can be removed in a follow-up.

Related: webrtc-sdk/webrtc-build#87

prepare-release opens its PR with a token from the same GitHub App (variable RELEASE_APP_CLIENT_ID, secret RELEASE_APP_PRIVATE_KEY), so the PR runs this repository's checks. Without the App it uses GITHUB_TOKEN, and the PR's checks have to be started by hand.

prepare-release opens release/<version> when webrtc-build publishes a
release (repository_dispatch webrtc-release) or by hand; release
publishes the GitHub release from the merged PR with the verified
binaries and their .shasum files.
@cloudwebrtc
cloudwebrtc requested a review from davidliu November 17, 2026 13:24
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/scripts/prepare_release.py Resolved
By default a newer run in the release concurrency group cancels the
pending one, which would leave that merged release unpublished.
queue: max keeps every waiting run (cancel-in-progress stays false).
…patch

A replayed webrtc-release notification for a release whose PR was
already merged added a second CHANGES.md entry and opened a new PR for
the same version. Leave the files unchanged when VERSION_NAME already
matches or CHANGES.md has the entry, so no PR is opened. Outstanding
release PRs are regenerated from the base branch and still update.

Also require a two-digit patch, as in webrtc-build.
cloudwebrtc added a commit to webrtc-sdk/webrtc-build that referenced this pull request Nov 19, 2026
## Summary

- **One build script.** `scripts/build.py` replaces the per-target
shell/Docker scripts for every shipped target: `apple*`, `android*`, and
the libwebrtc Linux/Windows builds moved from webrtc-sdk/libwebrtc.
Every package is a single-layer file with a `.shasum` (sha256).
- **Parallel CI.** Each platform syncs once, then compiles in parallel:
one job per Apple slice and per Android ABI, then an assemble job per
package.
- **Linux source cache** on a Namespace volume, shared by android,
libwebrtc Linux and unit tests. With the same commit the sync is
skipped. With the same `DEPS` only `src` is checked out (40 s). Build
outputs and test resources stay out of the cache.
- **Release flow driven by PRs.** `release-pr` opens
`release/<version>`. `release-pr-refresh` keeps it on the newest webrtc
commit. Merging it publishes `m<version>` and notifies Specs and
android.

## Flow

```mermaid
flowchart TD
  A["Run release-pr with a version, e.g. 150.7871.08"] --> B["PR release/&lt;version&gt; in webrtc-build<br/>VERSION = newest webrtc commit, commit list in body"]
  W["Push to webrtc-sdk/webrtc"] -. "webrtc-updated / hourly" .-> R["release-pr-refresh<br/>bump commit, refresh list"]
  R --> B
  B --> C["build on the PR"]
  subgraph BUILD["build.yml"]
    direction LR
    SA["gclient sync (apple)"] --> AS["33 jobs: 3 variants x 11 slices"] --> AA["3 xcframework zips"]
    SL["gclient sync (linux)<br/>cached"] --> AN["12 jobs: 3 variants x 4 ABIs"] --> AR["3 aars"]
    LW["libwebrtc linux / windows<br/>x64 + arm64"]
  end
  C --> BUILD
  BUILD --> M{"Merge PR"}
  M --> REL["release: m&lt;version&gt;<br/>packages + .shasum"]
  REL --> X["LiveKitWebRTC to livekit/webrtc-xcframework"]
  REL -- "repository_dispatch webrtc-release" --> S["Specs: bump PR"]
  REL -- "repository_dispatch webrtc-release" --> D["android: bump PR"]
  S -- merge --> S2["GitHub release + CocoaPods"]
  D -- merge --> D2["v&lt;version&gt; release + Maven"]
```

## Build time

"Before" is the last 3 successful build runs on main.

| | Before | After |
|---|---|---|
| Full build | 3h20m – 3h50m | 45 min (66 min when macOS runners queue)
|
| Apple, per package | 2h40m – 3h50m | 45 – 58 min |
| Android, per package | 69 – 86 min | 10 – 22 min |

## Testing

Run in test copies of this repository, Specs and android, built from a
fork of webrtc-sdk/webrtc:

- Full release with real apple and android packages: merge to published
release in 66 min, with 6 packages, each verified with `shasum -c`.
`LiveKitWebRTC.xcframework.zip` matches m150.7871.06 in slices and size.
- Release flow end to end with dry-run packages. Release PRs are opened
by the GitHub App, refreshed and pinned, then merged. The release is
published and the dispatch opens bump PRs in Specs and android.
- `sync` on all three hosts (cold, warm, `DEPS` fast path, skip, forced)
and `rtc_unittests` on Linux, macOS and Windows.
- libwebrtc Linux and Windows builds (x64 and arm64) passed, run alone
with the new `platforms` input of `build`.

## Notes

- Release PRs and the downstream dispatch use the `webrtc-sdk-release`
GitHub App, so release PRs trigger `build`. The App is installed on this
repository, Specs and android, and its variable and secret are set at
org level. No further setup is needed.
- Cleanup: the old build scripts and docs are left in place for now.
Once this flow has worked correctly in production, a follow-up PR will
remove `build/` and the outdated files: `docs/build.md`,
`docs/windows.md`, `webrtc_version.yaml` and
`webrtc_build_settings.yaml`.
- Follow-up: a workflow in webrtc-sdk/webrtc that sends `webrtc-updated`
on push. Until then `release-pr-refresh` polls hourly.

Related: webrtc-sdk/Specs#42, webrtc-sdk/android#62.
@cloudwebrtc
cloudwebrtc merged commit 84b3478 into main Nov 19, 2026
3 checks passed
@cloudwebrtc
cloudwebrtc deleted the ci/release-automation branch November 19, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants