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:
@next) and insiders (@insiders) publishing workflows to npm registry including testing and artifact generationFor information about the CI system that validates all changes, see Continuous Integration.
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 |
sync-branch.yaml | Manual + bot dispatch | Merge main into a release branch and update LKG |
Sources: .github/workflows/nightly.yaml1-66 .github/workflows/insiders.yaml1-66 .github/workflows/new-release-branch.yaml1-129 .github/workflows/set-version.yaml1-130 .github/workflows/lkg.yml1-52 .github/workflows/release-branch-artifact.yaml1-51 .github/workflows/sync-branch.yaml1-104
Diagram: Release workflow — workflows, branches, and npm tags
Sources: .github/workflows/nightly.yaml1-66 .github/workflows/insiders.yaml1-66 .github/workflows/new-release-branch.yaml1-129 .github/workflows/set-version.yaml1-130 .github/workflows/sync-branch.yaml1-104
TypeScript maintains version information in multiple locations that must be kept synchronized:
| File | Updated Field | Example Value |
|---|---|---|
package.json | "version" | "6.0.0", "6.0.1-rc" |
src/compiler/corePublic.ts | versionMajorMinor, version | "6.0", "6.0.0" |
tests/baselines/reference/api/typescript.d.ts | versionMajorMinor | "6.0" |
./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 sed package.json5versionMajorMinor and version constants in src/compiler/corePublic.ts src/compiler/corePublic.ts1-20versionMajorMinor in tests/baselines/reference/api/typescript.d.tspackage-lock.json via npm install package-lock.json1-9npx hereby LKGnpm test to validate./lib and commit everythingSources: .github/workflows/new-release-branch.yaml75-91 .github/workflows/set-version.yaml78-94
Diagram: Release Pipeline Sequence
Sources: .github/workflows/nightly.yaml33-65 .github/workflows/new-release-branch.yaml70-117 .github/workflows/sync-branch.yaml60-92
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 .github/workflows/nightly.yaml61 |
insiders.yaml | Before publishing typescript@insiders .github/workflows/insiders.yaml61 |
new-release-branch.yaml | As part of initial branch setup .github/workflows/new-release-branch.yaml82 |
set-version.yaml | After updating the version on an existing branch .github/workflows/set-version.yaml85 |
lkg.yml | Standalone LKG refresh on a release branch .github/workflows/lkg.yml47 |
release-branch-artifact.yaml | Before packing the release tarball .github/workflows/release-branch-artifact.yaml41 |
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/new-release-branch.yaml88 .github/workflows/set-version.yaml91 .github/workflows/lkg.yml50 .github/workflows/sync-branch.yaml67
All release workflows declare permissions: contents: read at the top level and elevate permissions via the typescript-automation[bot] for operations requiring write access.
Workflows that push commits configure the Git identity as follows:
290192711+typescript-automation[bot]@users.noreply.github.comtypescript-automation[bot]Several workflows include bot-specific input parameters that enable integration with the TypeScript Bot system:
distinct_id: Unique run identifier for tracking.source_issue: The GitHub issue that triggered the request.requesting_user: The user who invoked the bot command.status_comment: The specific comment ID to update with status reports.Sources: .github/workflows/new-release-branch.yaml20-35 .github/workflows/new-release-branch.yaml89-91 .github/workflows/set-version.yaml92-94 .github/workflows/sync-branch.yaml61-62