release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese-
Kill anyprocesses that might be running with SIGKILL
turbo -
Before beginning the release, verify that gcloud is logged in by running. If it fails, run
gcloud auth print-access-token >/dev/null, then repeat the check. Do not continue with the release until the check succeeds.gcloud auth login -
Codex-specific: Before running release commands, make sure rbenv wins over the macOS system Ruby. Codex may start non-interactive shells withbefore
/usr/bin, causing Ruby 2.6 to be used even though the user's terminal uses Ruby 3.3.x. Run release commands that may invoke Ruby/Bundler with:~/.rbenv/shimsVerify withPATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" <command>; it should use the user's rbenv Ruby, notPATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" ruby --version. This matters because the lambda Ruby package currently resolves gems such as/usr/bin/rubythat require Ruby >= 2.7.json -
Check. Only if it fails, run
npm whoami(I will manually do 2FA in the browser)npm login -
Useto get the password for NPM.
op item get "Npmjs" --fields password --reveal --account remotiondev.1password.com -
Useto get a one-time password for 2FA.
op item get "Npmjs" --otp --account remotiondev.1password.com -
Run. Replace XXXXXX with a random string so we have a unique name. Use
npm token create --name="PublishRemotionXXXXXX" --packages "remotion" --packages "create-video" --packages-and-scopes-permission read-write --bypass-2fa --scopes "@remotion" --otp=<otp>to get the OTP and pass it viaop item get "Npmjs" --otp --account remotiondev.1password.com. It will ask for a password, pipe in the password using--otp=.echo "$PASSWORD" |- Do not pass : npm masks the token as
--jsonin JSON output, making it unusable. Redirect the plain output to a file in the scratchpad and extract the token withnpm_***into a scratchpad file (e.g.grep -oE 'npm_[A-Za-z0-9]{20,}'). Never print the token. If a token turned out unusable, revoke it with$SP/npm_token(find the id withnpm token revoke <id> --otp=<otp>).npm token list
- Do not pass
-
Run
bun i -
Run
bun run build -
Runto get the current version number
npm view remotion version -
Run, where <version> is the current version plus 1. If the exit code is not 0, abort the entire release process immediately. Do not pipe its output (e.g. into
bun set-version.ts <version>): the shell is zsh, sotailis unavailable and the exit code gets lost. Redirect to a log file instead, then confirm the$PIPESTATUScommit and tag exist.v<version> -
Run. If this fails, abort the release.
cd packages/example && sh runlambda.sh && cd ../.. -
Publish the public packages under a temporary npm dist-tag, then promoteonly after every package is installable.
latestis npm's automatic scan for ordinary publishes, not a reason to usevalidating. Do not runnpm stage: its current script publishes directly tobun run releaseand starts private publishing and Git pushes before the availability gate.latest-
From the repository root, after, run:
set-version.tsbashreleaseVersion=$(node -p "require('./packages/core/package.json').version") releaseTag="remotion-release-$(printf '%s' "$releaseVersion" | tr . -)" releaseManifest="/tmp/remotion-release-${releaseVersion}-packages.txt" bun publish.ts --list > "$releaseManifest"The manifest is the exact package list to check and promote. Record each package's previoustag so a partial promotion can be rolled back.latest -
Check whether any package in the manifest is being published to npm for the first time. Bun addsto a package's initial publish even with
latest. If there are new packages, stop before the bulk publish and plan their first publication separately; this flow cannot keep their first version off--tag.latest -
Runwith the token created above. Bun still packs the packages and rewrites
NPM_CONFIG_TOKEN=<token> bun publish.ts --tag="$releaseTag"andworkspace:dependencies. This tagged path does not tolerate republish errors. A successful upload is not proof that npm's scan is finished: check the manifest, exact package versions, and temporary tags. Do not upload the same version again while its scan is pending. If a publish attempt failed and the version is confirmed absent, resume that package alone withcatalog:using the same token; never rerun the entire manifest blindly.bun publish.ts --tag="$releaseTag" --only=<package> -
For each package in the manifest, requireand a successful
npm view <package>@<version> version --jsonbefore promotion. The pack check confirms the tarball can actually be fetched. Run the per-package checks with anpm pack <package>@<version> --pack-destination <temporary-directory>loop (notwhile read -r p; do ( ... ) & done < "$releaseManifest"; wait, which fails with "command line cannot be assembled"). Right after publishing, expect roughly a third of the packages to still bexargs -I; this has taken ~15 minutes. Write the polling loop as a script and run it in the background, and draft the changelog meanwhile. Poll unresolved packages about once per minute; use the npm lifecycle status API where available:validating, authenticated with publish access. URL-encode scoped names, such asGET https://registry.npmjs.org/-/package/<encoded-package-name>/version/<version>/status, and keep credentials out of logs. If a package remains@remotion%2Fwhisper-webafter an hour, report the release as pending and leave everyvalidatingtag on the prior release. Blocked, rejected, manual-review, missing, and unknown states also stop promotion; investigate them rather than treating them as scanning delays.latest -
Once all packages are installable, use the release token to runfor every package in the manifest. The npm CLI ignores
npm dist-tag add <package>@<version> latest(onlyNPM_CONFIG_TOKENrespects it) and falls back to the login session, failing withbun publish. Pass the token like this instead:EOTP. This is one registry operation per package; npm has no atomic multi-package promotion. Verify thatenv "npm_config_//registry.npmjs.org/:_authToken=$TOKEN" npm dist-tag add ...equals the release version for every package. Parallel checks can return stale cached tags for a few packages; recheck mismatches sequentially before treating them as failures. If promotion fails partway, restore the recorded previousnpm view <package> dist-tags.latest --prefer-onlinetags for packages already changed and report the incomplete release. After a successful promotion, remove the temporary tag from each package and verify the final tags. The release token getslatestonE403, so use the logged-in session with a fresh OTP per call:dist-tag rm. If a call fails because the OTP rolled over, wait 30 seconds and retry once.npm dist-tag rm <package> <releaseTag> --otp=$(op item get "Npmjs" --otp --account remotiondev.1password.com) -
If npm explicitly returns, direct publishing is unavailable for that package. Stop this release and assess a staged workflow separately; staged approval requires a 2FA action per package. Do not silently mix a staged package into this direct-publish flow.
E_STAGE_REQUIRED
-
-
Only after all publictags are verified, run
latest, thenbunx turbo run publishprivate --concurrency=1andgit push --tagsfrom the repository root. If any step fails, stop and report the affected release state.git push -
Runfrom the repository root to republish every template after the public packages have been promoted. If any template fails to publish, stop the release workflow and report the failure.
bun run publishtemplates -
Generate a changelog in markdown and save it to:
/tmp/release-<version>.md- Run to get all commits
git log v<previous_version>..v<new_version> --oneline - Extract PR numbers from merge commits
- For each PR, run
gh pr view <number> --json title,author,number,url --jq '"* \(.title) by @\(.author.login) in \(.url)"' - Categorize PRs into sections: "What's Changed", "Templates", "Docs", "Internal"
- Also use the "Elements" and "Internal and Experimental" sections when previous releases do
- In "What's Changed", put headline features (especially ones with new docs pages) first, then sort items so that entries for the same package are adjacent (no subheadings, just sorted order). Changes to the core package should appear first
remotion - Strip redundant prefixes from PR titles (e.g. remove "Docs:" from items in the Docs section)
- Linkify items whose PR added a new documentation page: run to list added docs pages, map each added page to the PR that introduced it, and wrap that item's title in a markdown link to the page (e.g.
git diff --diff-filter=A --name-only v<previous_version>..v<new_version> -- 'packages/docs/docs/**/*.mdx' 'packages/docs/docs/**/*.md'). Determine the URL from the page's* [<title>](https://remotion.dev/docs/<slug>) by @author in <url>frontmatter if present, otherwise from its file path relative toslug:. Leave items without a new docs page unlinked.packages/docs/docs/ - "Templates" is a separate section for any template-* changes
- Check for genuinely new contributors by running and comparing against PR authors. Only add a "New Contributors" section for authors not in that list
gh api repos/remotion-dev/remotion/contributors --paginate --jq '.[].login' - Add at the bottom
**Full Changelog**: https://github.com/remotion-dev/remotion/compare/v<previous_version>...v<new_version> - Use the same format as previous GitHub releases (check with )
gh release view v<previous_version> - Don't release until you get approval. Allow me to edit it before. This does not block the npm steps: draft the changelog while npm scans packages, and continue with promotion, private publishing, pushes and templates without waiting.
- After approval, re-read (I may have edited it) and run
/tmp/release-<version>.md.gh release create v<version> --title v<version> --notes-file /tmp/release-<version>.md --verify-tag
- Run
-
Finally, delete the local copies of the npm token from the scratchpad. It expires by itself after 7 days.
- 使用 SIGKILL 终止任何可能正在运行的 进程
turbo - 在开始发布前,通过运行 验证 gcloud 是否已登录。如果失败,运行
gcloud auth print-access-token >/dev/null,然后重复检查。在检查成功前不要继续发布。gcloud auth login - Codex 专属:运行发布命令前,确保 rbenv 优先于 macOS 系统 Ruby。Codex 可能会在 之前以
~/.rbenv/shims启动非交互式 shell,导致使用 Ruby 2.6,即使用户终端使用的是 Ruby 3.3.x。对于可能调用 Ruby/Bundler 的发布命令,请使用:/usr/bin使用PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" <command>验证;它应使用用户的 rbenv Ruby,而不是PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" ruby --version。这一点很重要,因为 lambda Ruby 包当前解析的/usr/bin/ruby等 gem 要求 Ruby >= 2.7。json - 检查 。仅当该命令失败时,才运行
npm whoami(我会在浏览器中手动完成 2FA)npm login - 使用 获取 NPM 密码。
op item get "Npmjs" --fields password --reveal --account remotiondev.1password.com - 使用 获取用于 2FA 的一次性密码。
op item get "Npmjs" --otp --account remotiondev.1password.com - 运行 。将 XXXXXX 替换为随机字符串,以获得唯一名称。使用
npm token create --name="PublishRemotionXXXXXX" --packages "remotion" --packages "create-video" --packages-and-scopes-permission read-write --bypass-2fa --scopes "@remotion" --otp=<otp>获取 OTP,并通过op item get "Npmjs" --otp --account remotiondev.1password.com传入。它会要求输入密码,使用--otp=通过管道传入。echo "$PASSWORD" |- 不要传入 :npm 会在 JSON 输出中将 token 掩码为
--json,使其无法使用。将纯文本输出重定向到 scratchpad 中的文件,并使用npm_***将 token 提取到 scratchpad 文件(例如grep -oE 'npm_[A-Za-z0-9]{20,}')。绝不打印 token。如果某个 token 最终不可用,使用$SP/npm_token撤销它(使用npm token revoke <id> --otp=<otp>查找 id)。npm token list
- 不要传入
- 运行
bun i - 运行
bun run build - 运行 获取当前版本号
npm view remotion version - 运行 ,其中
bun set-version.ts <version>为当前版本加 1。如果退出码不是 0,立即中止整个发布流程。不要对输出进行管道处理(例如传入<version>):shell 为 zsh,因此tail不可用,退出码会丢失。改为重定向到日志文件,然后确认$PIPESTATUScommit 和 tag 均存在。v<version> - 运行 。如果失败,中止发布。
cd packages/example && sh runlambda.sh && cd ../.. - 先使用临时 npm dist-tag 发布公共包,只有在每个包都可安装后,才能将 提升到新版本。
latest是 npm 对普通发布执行的自动扫描,不是使用validating的理由。不要运行npm stage:当前脚本会直接发布到bun run release,并在可用性检查通过前启动私有包发布和 Git push。latest-
从仓库根目录运行后,执行:
set-version.tsbashreleaseVersion=$(node -p "require('./packages/core/package.json').version") releaseTag="remotion-release-$(printf '%s' "$releaseVersion" | tr . -)" releaseManifest="/tmp/remotion-release-${releaseVersion}-packages.txt" bun publish.ts --list > "$releaseManifest"manifest 是需要检查和提升的精确包列表。记录每个包原先的tag,以便在部分提升失败时回滚。latest -
检查 manifest 中是否有包将首次发布到 npm。Bun 即使使用,也会在包首次发布时添加
--tag。如果存在新包,请在批量发布前停止,并单独规划其首次发布;此流程无法让这些包的首个版本避开latest。latest -
使用上述创建的 token 运行。Bun 仍会打包这些包,并重写
NPM_CONFIG_TOKEN=<token> bun publish.ts --tag="$releaseTag"和workspace:依赖。这个带 tag 的发布路径无法容忍重复发布错误。上传成功并不能证明 npm 扫描已经完成:请检查 manifest、精确的包版本和临时 tag。扫描待处理期间,不要再次上传同一版本。如果某次发布尝试失败且已确认该版本不存在,仅使用catalog:恢复该包;绝不要盲目重跑整个 manifest。bun publish.ts --tag="$releaseTag" --only=<package> -
对于 manifest 中的每个包,在提升前必须要求和
npm view <package>@<version> version --json成功。pack 检查可确认 tarball 确实能够获取。使用npm pack <package>@<version> --pack-destination <temporary-directory>循环执行逐包检查(不要使用while read -r p; do ( ... ) & done < "$releaseManifest"; wait,后者会报 "command line cannot be assembled")。发布后不久,预计约三分之一的包仍会处于xargs -I;整个过程可能持续约 15 分钟。将轮询循环编写为脚本并在后台运行,同时起草更新日志。每隔约一分钟轮询一次尚未解决的包;在可用时使用 npm lifecycle status API:以发布权限进行认证后,执行validating。对 scoped 名称进行 URL 编码,例如GET https://registry.npmjs.org/-/package/<encoded-package-name>/version/<version>/status,并确保凭据不出现在日志中。如果某个包在一小时后仍为@remotion%2Fwhisper-web,将发布报告为 pending,并让所有validatingtag 保持在上一版本。latest、blocked、rejected、manual-review和missing状态也会阻止提升;应调查这些状态,而不是将其视为扫描延迟。unknown -
一旦所有包都可安装,就使用发布 token 对 manifest 中的每个包运行。npm CLI 会忽略
npm dist-tag add <package>@<version> latest(只有NPM_CONFIG_TOKEN会读取它),转而使用登录会话,并因bun publish而失败。请改为以下方式传入 token:EOTP。这是每个包一次 registry 操作;npm 不支持多包原子提升。验证每个包的env "npm_config_//registry.npmjs.org/:_authToken=$TOKEN" npm dist-tag add ...均等于发布版本。并行检查时,少数包可能返回过期的缓存 tag;在将不匹配项视为失败前,应顺序重新检查。如果提升在中途失败,为已更改的包恢复已记录的上一版npm view <package> dist-tags.latest --prefer-onlinetag,并报告发布不完整。成功提升后,从每个包移除临时 tag,并验证最终 tag。发布 token 在执行latest时会收到dist-tag rm,因此改用已登录会话,并为每次调用获取新的 OTP:E403。如果调用因 OTP 已轮换而失败,等待 30 秒后重试一次。npm dist-tag rm <package> <releaseTag> --otp=$(op item get "Npmjs" --otp --account remotiondev.1password.com) -
如果 npm 明确返回,则该包无法直接发布。停止本次发布,并单独评估 staged 流程;staged 审批要求为每个包执行一次 2FA 操作。不要将 staged 包悄悄混入此直接发布流程。
E_STAGE_REQUIRED
-
- 仅在所有公共包的 tag 都验证无误后,运行
latest,然后在仓库根目录执行bunx turbo run publishprivate --concurrency=1和git push --tags。如果任一步骤失败,停止操作并报告受影响的发布状态。git push - 在仓库根目录运行 ,在公共包完成提升后重新发布每个 template。如果任何 template 发布失败,停止发布流程并报告失败。
bun run publishtemplates - 使用 Markdown 生成更新日志,并保存到 :
/tmp/release-<version>.md- 运行 获取所有 commit
git log v<previous_version>..v<new_version> --oneline - 从 merge commit 中提取 PR 编号
- 对于每个 PR,运行
gh pr view <number> --json title,author,number,url --jq '"* \(.title) by @\(.author.login) in \(.url)"' - 将 PR 分类到以下栏目:"What's Changed"、"Templates"、"Docs"、"Internal"
- 当之前的 release 使用相应栏目时,也使用 "Elements" 和 "Internal and Experimental" 栏目
- 在 "What's Changed" 中,将重点功能(尤其是带新增文档页面的功能)放在最前,然后排序条目,使同一包的条目相邻(不使用子标题,只调整顺序)。对 核心包的更改应排在最前
remotion - 去除 PR 标题中冗余的前缀(例如,在 Docs 栏目中移除 "Docs:")
- 对于其 PR 新增了文档页面的条目,添加 Markdown 链接:运行 列出新增文档页面,将每个新增页面映射到引入它的 PR,并把条目标题包装为指向页面的 Markdown 链接(例如
git diff --diff-filter=A --name-only v<previous_version>..v<new_version> -- 'packages/docs/docs/**/*.mdx' 'packages/docs/docs/**/*.md')。如果 frontmatter 中有* [<title>](https://remotion.dev/docs/<slug>) by @author in <url>,则使用它确定 URL;否则根据文件相对于slug:的路径确定。没有新增文档页面的条目不要添加链接。packages/docs/docs/ - "Templates" 是单独栏目,用于放置所有 template-* 更改
- 运行 并与 PR 作者比较,以检查真正的新贡献者。仅为此列表中不存在的作者添加 "New Contributors" 栏目
gh api repos/remotion-dev/remotion/contributors --paginate --jq '.[].login' - 在底部添加
**Full Changelog**: https://github.com/remotion-dev/remotion/compare/v<previous_version>...v<new_version> - 使用与之前 GitHub release 相同的格式(通过 查看)
gh release view v<previous_version> - 获得批准前不要发布。允许我编辑它。这不会阻塞 npm 步骤:在 npm 扫描包时起草更新日志,并在无需等待的情况下继续提升、私有包发布、push 和模板发布。
- 获得批准后,重新读取 (我可能已编辑),并运行
/tmp/release-<version>.mdgh release create v<version> --title v<version> --notes-file /tmp/release-<version>.md --verify-tag
- 运行
- 最后,删除 scratchpad 中保存的本地 npm token 副本。该 token 会在 7 天后自动过期。