-
Notifications
You must be signed in to change notification settings - Fork 5
Home
This guide is for maintainers who cut a BlueScript release. Automation does most of the publishing; your job is to prepare versions, create the GitHub Release correctly, and merge the docs PR.
Two workflows run when a GitHub Release is published:
| Workflow | What it does |
|---|---|
| Release Components | Uploads the microcontroller ZIP and publishes @bscript/lang, @bscript/notebook, and @bscript/cli to npm |
| Release Website | Snapshots docs and opens a PR against main
|
After you merge that PR, Deploy website publishes the site to GitHub Pages.
| Type | GitHub Release | Tag example | npm dist-tag | Docs version |
|---|---|---|---|---|
| Stable | Pre-release unchecked | v2.1.0 |
latest |
2.1.x |
| Pre-release (alpha / beta / rc) | Pre-release checked | v2.1.0-alpha.1 |
alpha (or beta, rc, …) |
2.1.0-alpha.x |
Rules enforced by CI:
- A GitHub pre-release must use a semver prerelease segment (
2.1.0-alpha.1). Plain2.1.0will fail. - A stable GitHub release must not use a prerelease version. Tagging
v2.1.0-alpha.1without the Pre-release checkbox will fail. - The prerelease identifier must not be numeric-only (
2.1.0-1is rejected; use2.1.0-alpha.1).
Before creating the release:
- All intended changes are on
main(or on the commit you will tag). - CI is green for that commit.
- You have permission to create GitHub Releases and merge PRs into
main. - npm Trusted Publishing is configured for
@bscript/lang,@bscript/cli, and@bscript/notebookfor workflowrelease-components.yml(no long-livedNPM_TOKENis used).
Update these so they all match the version you will tag (without the leading v):
| File | What to set |
|---|---|
lang/package.json |
"version" |
notebook/package.json |
"version" |
cli/package.json |
"version" |
cli/package.json |
"dependencies"."@bscript/lang" and "@bscript/notebook" — exact same version (no ^ / ~) |
Example for 2.1.0-alpha.1:
// lang/package.json, notebook/package.json, cli/package.json
"version": "2.1.0-alpha.1"
// cli/package.json dependencies
"@bscript/lang": "2.1.0-alpha.1",
"@bscript/notebook": "2.1.0-alpha.1"Commit and push to main (or to the branch you will tag from).
The release workflow verifies every workspace version and every
@bscript/*dependency against the tag. A mismatch fails the job before publish.
Create the tag on the Releases page — do not create it from the CLI.
- Confirm the release commit is on
main(or the target branch) and has been pushed. - Open GitHub → Releases → Draft a new release.
- Under Choose a tag, type the new tag (e.g.
v2.1.0-alpha.1orv2.1.0) and select Create new tag on publish. - Under Target, select the branch or commit that contains the version bumps from Step 1 (usually
main). - Set the title (usually the same as the tag).
- Write release notes.
-
Critical:
- Pre-release → check Set as a pre-release
- Stable → leave it unchecked (and do not mark as latest pre-release)
- Click Publish release.
Publishing the release creates the tag and starts both workflows.
Two jobs run in parallel:
1. Microcontroller ZIP
- Zips
microcontroller/ - Uploads
release-microcontroller-<tag>.zipto the GitHub Release (overwrites if re-run)
2. npm publish (order: lang → notebook → cli)
- Decides the npm dist-tag (
latestoralpha/beta/ …) - Verifies package versions
- Builds workspaces
- Publishes each package
- If that exact version already exists on npm → skip
- Any other failure → job fails (do not ignore a green job without checking logs)
Install commands users will use:
# Stable
npm install -g @bscript/cli
# Pre-release (example: alpha)
npm install -g @bscript/cli@alpha- Checks out
main - Derives the Docusaurus version:
- Stable
2.1.0→2.1.x - Pre-release
2.1.0-alpha.1→2.1.0-alpha.x
- Stable
- On a stable release, removes superseded prerelease doc versions whose base version is ≤ the stable version (e.g. releasing
2.1.1removes2.1.0-alpha.xand2.1.1-beta.x, but keeps2.2.0-alpha.x) - Snapshots docs from the release tag (not whatever landed on
mainafter the tag) - Opens a PR:
- Branch:
docs-version-<doc-version> - Base:
main
- Branch:
The site is not updated until you merge this PR.
- Review the PR (versioned docs / sidebars /
versions.json). - Merge into
main. - Confirm Deploy website succeeds and check the live docs.