Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/changeset-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Fails a PR that changes the package without a changeset, with a comment
# that links to a prefilled changeset file. The `internal` label skips it.
# On the release PR, it also runs `npm publish --dry-run`
# (`[check].publish_dry_run`), so a version that npm rejects does not reach
# main. The release PR is opened with the App token, so this workflow runs
# on it.
name: Changeset check

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # the dry run needs the tags
# The dry run runs the `prepare` script (bob build), which needs the
# installed workspace. Only the release PR runs the dry run.
- if: startsWith(github.head_ref, 'release/')
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock
- if: startsWith(github.head_ref, 'release/')
run: corepack enable && yarn install --immutable
- uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: check
61 changes: 0 additions & 61 deletions .github/workflows/changeset.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# On demand: open an rc PR from the branch the workflow is run on. Merging
# it tags 3.3.0-rc.1 and publishes under the `next` dist-tag. Changesets
# stay pending for the final release.
name: Pre-release PR

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # the tags number the rc
- uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: pre-release
args: --target ${{ github.ref_name }}
app-client-id: ${{ secrets.VERWALTER_RELEASE_CLIENT_ID }}
app-private-key: ${{ secrets.VERWALTER_RELEASE_APP_KEY }}
29 changes: 29 additions & 0 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Keeps one release PR open while changesets are pending. Runs on every
# push to main and regenerates the release branch from main.
name: Release PRs

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

concurrency:
group: release-prs
cancel-in-progress: true

jobs:
pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # the commit that added a changeset gives its changelog line the PR and author
- uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: pr
# The App token lets the release PR trigger CI. github.token does not.
app-client-id: ${{ secrets.VERWALTER_RELEASE_CLIENT_ID }}
app-private-key: ${{ secrets.VERWALTER_RELEASE_APP_KEY }}
185 changes: 185 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# After a release PR merges: build, then tag and create the GitHub
# release, then publish to npm. The step that cannot be undone comes last.
# The file name stays release.yaml: npm trusted publishing names it.
name: Release

on:
# No `branches` filter: an rc PR from pre-release.yaml targets the branch
# the workflow was run on. The `gate` job decides which PRs release.
pull_request:
types: [closed]
# A failed job is re-run with "Re-run failed jobs" on the run itself: that
# keeps the merge commit. This trigger is for a run that needs a fixed
# workflow file from the branch. `verwalter release` resumes from the
# current state and skips what is done.
workflow_dispatch:
inputs:
ref:
description: 'Commit or tag to build and publish. Set it to the release tag when the tag exists. Empty is the branch head.'
type: string
default: ''

permissions:
contents: write
id-token: write # npm trusted publishing

jobs:
# Only a run by hand, or a merged release PR or rc PR that the tool
# opened: the branch name alone would let any pushed `release/*` branch
# trigger a publish. The author is `[release].author` in verwalter.toml,
# default verwalter-release[bot].
gate:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
release: ${{ steps.verwalter.outputs.release }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
- id: verwalter
uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: gate

# Before the tag: a commit that does not build is never tagged.
build:
needs: gate
if: needs.gate.outputs.release == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# On a run by hand, `ref` is the released tag: the branch head can
# hold newer source than the version that is published. `publish`
# fails when the files changed since the tag.
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
- name: Use Node.js 24
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock
- run: corepack enable
- run: yarn install --immutable
- run: yarn typescript && yarn prepare

release:
needs: build
runs-on: ubuntu-latest
outputs:
released: ${{ steps.verwalter.outputs.released }}
releases: ${{ steps.verwalter.outputs.releases }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The merge commit itself: a push to main right after the merge
# must not move the tags.
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
fetch-depth: 0
- id: verwalter
uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: release
app-client-id: ${{ secrets.VERWALTER_RELEASE_CLIENT_ID }}
app-private-key: ${{ secrets.VERWALTER_RELEASE_APP_KEY }}

# `npm publish` runs the `prepare` script (bob build) on the installed
# workspace. Skips a version npm already has, so a re-run is safe.
publish:
needs: release
if: needs.release.outputs.released == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
# One publish at a time, in arrival order. A waiting publish checks out
# after the running one ends, so it sees the newer tag and picks the
# right npm dist-tag. `queue: max` keeps every waiting run: without it,
# a third run cancels the waiting one.
concurrency:
group: npm-publish
cancel-in-progress: false
queue: max
permissions:
contents: write # the tool flips the draft release after the publish
id-token: write # npm trusted publishing
outputs:
published: ${{ steps.publish.outputs.published }}
outcomes: ${{ steps.publish.outputs.outcomes }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
fetch-depth: 0 # tags decide what is published
# No registry-url: its placeholder token breaks trusted publishing.
- name: Use Node.js 24
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24 # npm 11.5.1 or later is required for OIDC trusted publishing
cache: yarn
cache-dependency-path: yarn.lock
- run: corepack enable
- run: yarn install --immutable
- id: publish
uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
env:
GH_TOKEN: ${{ github.token }}
with:
command: publish
releases: ${{ needs.release.outputs.releases }}

# After the publish, in its own job: a failure here is red, and the
# release jobs stay green. The docs site shows the latest stable version,
# so a pre-release (a version with `-`) does not replace it. `outcomes`
# carries the version also on a re-run by hand, where `releases` is empty.
# `exists` counts too: a repair run finds the version on npm, and the docs
# of that version still need their upload.
# Only from main: the site holds one version, and a release from another
# branch must not replace it.
# ponytail: a run by hand with an older tag uploads older docs. Skip when a
# newer final tag exists, if that ever happens.
docs:
needs: publish
if: (contains(fromJSON(needs.publish.outputs.outcomes).*.status, 'published') || contains(fromJSON(needs.publish.outputs.outcomes).*.status, 'exists')) && !contains(join(fromJSON(needs.publish.outputs.outcomes).*.version), '-') && (github.event.pull_request.base.ref == 'main' || github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
- name: Use Node.js 24
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock
- run: corepack enable
- run: yarn install --immutable
- name: Build docs
run: yarn build-docs --treatWarningsAsErrors
- name: S3 Upload
run: aws s3 cp docs/ s3://livekit-docs/client-sdk-react-native --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: 'us-east-1'

# The end state, asserted: `status --check` fails when the tag is not on
# the remote, the GitHub release is missing or still a draft, or npm does
# not have the version. A step that was skipped without an error ends here.
verify:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write # reads only. A draft release is visible only with write access
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.merge_commit_sha || inputs.ref || github.sha }}
fetch-depth: 0
- uses: livekit/verwalter@9da894a1e4f7d298095a961be60c818afd47905b # v0.32.0-rc.1
with:
command: status
args: --check
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ lib/
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions
!**/.yarn/versions
# typedoc output, uploaded to S3 by release.yaml
docs/
7 changes: 0 additions & 7 deletions .pinact.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
version: 3

ignore_actions:
# changesets/action v2 requires @changesets/cli v3 and renames the
# `version`/`publish` inputs. Hold v1.9.0 until the repo migrates to
# Changesets v3; remove this entry as part of that migration.
- name: changesets/action
ref: a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The pre-commit hook runs `yarn lint && yarn typescript`. CI additionally compile
- `android/`, `ios/` — native modules (Kotlin / Swift+ObjC); mostly audio session management, audio processing, and video codec factories. Podspec: `livekit-react-native.podspec`.
- `example/` — bare RN example app (yarn workspace, not Expo).
- `ci/` — minimal RN app used only for native compile checks in CI.
- `docs/` — generated typedoc output; do not edit by hand.
- `docs/` — typedoc output (`yarn build-docs`), not committed. `release.yaml` uploads it to the docs site.

Expo support lives in a separate repo: [client-sdk-react-native-expo-plugin](https://github.com/livekit/client-sdk-react-native-expo-plugin).

Expand Down Expand Up @@ -71,4 +71,4 @@ Polyfills and API surface:

## Releases

Uses [Changesets](https://github.com/changesets/changesets). Every user-facing change needs a changeset (`yarn changeset`); releases are published from `main` by the Release workflow.
Uses [verwalter](https://github.com/livekit/verwalter) (`verwalter.toml`). Every user-facing change needs a changeset file in `.changeset/` (`verwalter changeset`). Merging the release PR `release/main` publishes. See `RELEASING.md`.
Loading
Loading