This document provides an overview of the TypeScript release management system, including the different release channels, version management, and automated workflows that facilitate the release process. It covers the infrastructure that maintains both continuous nightly/insiders builds and stable versioned releases.
For specific implementation details, see:
main branchmain to release branchesFor information about the CI system that validates all changes, see page 13.1 (Main CI Pipeline).
The TypeScript repository maintains three release channels:
| Channel | Workflow | Source | Frequency | npm Tag | Purpose |
|---|---|---|---|---|---|
| Nightly | nightly.yaml | main branch | Daily at 07:00 UTC | @next | Continuous integration builds for broad testing |
| Insiders | insiders.yaml | main branch | On-demand (manual or bot-triggered) | @insiders | Curated pre-release builds for early adopters |
| Stable | Manual publish | release-X.Y branches | Per-release milestone | @latest | Production-ready versioned releases |
The release management system is implemented through these GitHub Actions workflows in .github/workflows/:
| Workflow File | Trigger | Purpose |
|---|---|---|
nightly.yaml | Daily schedule + manual | Build and publish typescript@next from main |
insiders.yaml | Manual + bot dispatch | Build and publish typescript@insiders from main |
new-release-branch.yaml | Manual + bot dispatch | Create a new release-X.Y branch with version bump and initial LKG |
set-version.yaml | Manual + bot dispatch | Update version and LKG on an existing release branch |
lkg.yml | Manual | Rebuild and commit the LKG on a specified release branch |
release-branch-artifact.yaml | Push to release-* | Run full test suite and upload a packed typescript.tgz artifact |
open-cherry-pick-pr (script) | Manual + bot dispatch | Cherry-pick a merged PR onto a release branch |
Sources: .github/workflows/nightly.yaml1-65 .github/workflows/insiders.yaml1-66 .github/workflows/new-release-branch.yaml1-100 .github/workflows/set-version.yaml1-103 .github/workflows/lkg.yml1-52 .github/workflows/release-branch-artifact.yaml1-51
Diagram: Release workflow — workflows, branches, and npm tags
Sources: .github/workflows/nightly.yaml1-65 .github/workflows/insiders.yaml1-66 .github/workflows/new-release-branch.yaml1-100 .github/workflows/set-version.yaml1-103 .github/workflows/lkg.yml1-52 .github/workflows/release-branch-artifact.yaml1-51
TypeScript maintains version information in multiple locations that must be kept synchronized:
| File | Updated Field | Example Value |
|---|---|---|
package.json | version | 5.7.0, 5.7.1-rc |
src/compiler/corePublic.ts | versionMajorMinor, version | "5.7", "5.7.0" |
tests/baselines/reference/api/typescript.d.ts | versionMajorMinor | "5.7" |
./lib/ directory | compiled artifacts | LKG build output |
The version bump process is automated by the new-release-branch.yaml and set-version.yaml workflows, which apply the following in sequence:
package.json version field via sedversionMajorMinor and version constants in src/compiler/corePublic.ts via sedversionMajorMinor in tests/baselines/reference/api/typescript.d.ts via sedpackage-lock.json via npm installnpx hereby LKGnpm test to validate./lib and commit everythingSources: .github/workflows/new-release-branch.yaml67-88 .github/workflows/set-version.yaml71-91
Diagram: Sequence of steps within each release workflow
Sources: .github/workflows/nightly.yaml19-65 .github/workflows/insiders.yaml17-66 .github/workflows/new-release-branch.yaml49-88 .github/workflows/lkg.yml21-52 .github/workflows/release-branch-artifact.yaml17-51
nightly.yamlschedule (daily at 0 7 * * *) or workflow_dispatchgithub.repository == 'microsoft/TypeScript'Sources: .github/workflows/nightly.yaml3-8 .github/workflows/nightly.yaml21
insiders.yamlworkflow_dispatch (manual) or repository_dispatch with type publish-insidersgithub.repository == 'microsoft/TypeScript'Sources: .github/workflows/insiders.yaml3-6 .github/workflows/insiders.yaml20
new-release-branch.yaml| Input | Required | Description |
|---|---|---|
branch_name | Yes | Release branch to create, e.g. release-5.7 |
package_version | Yes | Full npm version, e.g. 5.7.0 or 5.7.1-rc |
core_major_minor | Yes | Compiler versionMajorMinor, e.g. 5.7 |
distinct_id | No | Bot: unique run identifier |
source_issue | No | Bot: triggering issue number |
requesting_user | No | Bot: requesting GitHub user |
status_comment | No | Bot: comment ID to update with result |
Sources: .github/workflows/new-release-branch.yaml5-35
set-version.yamlAccepts the same inputs as new-release-branch.yaml except branch_name must be an existing branch. The workflow checks out that branch and applies the same version+LKG update sequence without creating a new branch.
Sources: .github/workflows/set-version.yaml5-35 .github/workflows/set-version.yaml64-91
lkg.yml| Input | Required | Description |
|---|---|---|
branch_name | Yes | Release branch to update LKG on |
The workflow validates that branch_name starts with release- before proceeding.
Sources: .github/workflows/lkg.yml5-9 .github/workflows/lkg.yml24-28
release-branch-artifact.yamlpush to any branch matching release-*typescript.tgz uploaded as a GitHub Actions artifact named tgzSources: .github/workflows/release-branch-artifact.yaml3-7 .github/workflows/release-branch-artifact.yaml45-51
The LKG system maintains a pre-built, validated version of the TypeScript compiler in the ./lib directory. This directory contains compiled JavaScript and TypeScript declaration files and bootstraps subsequent compilations.
The hereby LKG task is executed by multiple workflows:
| Workflow | When LKG is built |
|---|---|
nightly.yaml | Before publishing typescript@next |
insiders.yaml | Before publishing typescript@insiders |
new-release-branch.yaml | As part of initial branch setup |
set-version.yaml | After updating the version on an existing branch |
lkg.yml | Standalone LKG refresh on a release branch |
release-branch-artifact.yaml | Before packing the release tarball |
The ./lib directory is tracked in the repository using git add --force because it is normally excluded by .gitignore. This ensures the LKG artifacts are available for bootstrapping the compiler build on both main and release branches.
Sources: .github/workflows/insiders.yaml61 .github/workflows/nightly.yaml61 .github/workflows/new-release-branch.yaml78 .github/workflows/set-version.yaml81 .github/workflows/lkg.yml46-47 .github/workflows/release-branch-artifact.yaml41
All release workflows declare permissions: contents: read at the top level and elevate only via secrets when write access is required:
| Workflow | Secret Used | Purpose |
|---|---|---|
nightly.yaml | secrets.npm_token (as NODE_AUTH_TOKEN) | Publish typescript@next to npm |
insiders.yaml | secrets.npm_token (as NODE_AUTH_TOKEN) | Publish typescript@insiders to npm |
new-release-branch.yaml | secrets.TS_BOT_GITHUB_TOKEN | Push new branch commits to GitHub |
set-version.yaml | secrets.TS_BOT_GITHUB_TOKEN | Push version bump commits to GitHub |
lkg.yml | secrets.TS_BOT_GITHUB_TOKEN | Push LKG update commits to GitHub |
release-branch-artifact.yaml | (none — artifact upload only) | No write token required |
Sources: .github/workflows/nightly.yaml8-9 .github/workflows/nightly.yaml64-65 .github/workflows/insiders.yaml8-9 .github/workflows/insiders.yaml64-65 .github/workflows/new-release-branch.yaml39-40 .github/workflows/new-release-branch.yaml57 .github/workflows/set-version.yaml39-40 .github/workflows/set-version.yaml55 .github/workflows/lkg.yml11-12 .github/workflows/lkg.yml35
All workflows that push commits configure the Git identity as the TypeScript Bot before committing:
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
This identity is used in:
new-release-branch.yaml — release branch creation commitset-version.yaml — version bump commitlkg.yml — LKG update commitsync-branch.yaml — merging main into a release branchSources: .github/workflows/new-release-branch.yaml85-86 .github/workflows/set-version.yaml88-89 .github/workflows/lkg.yml48-49 .github/workflows/sync-branch.yaml57-58
The cherry-pick automation includes intelligent baseline conflict resolution. When cherry-picking a PR causes conflicts exclusively in tests/baselines/, the workflow:
git add tests/baselinesgit -c core.editor=true cherry-pick --continuenpm cinpm test -- --no-lintnpx hereby baseline-acceptIf conflicts exist in files outside tests/baselines/, the workflow fails, requiring manual intervention.
See page 14.3 for the full cherry-pick automation details.
Several workflows include bot-specific input parameters (distinct_id, source_issue, requesting_user, status_comment) that enable integration with the TypeScript Bot system. When these parameters are provided:
post-workflow-result actionThis enables automated workflow triggering through issue comments or other bot interactions.
Sources: .github/workflows/new-release-branch.yaml19-35 .github/workflows/new-release-branch.yaml86-95 .github/workflows/create-cherry-pick-pr.yml15-31 .github/workflows/create-cherry-pick-pr.yml180-189
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.