Releases publish from main via the release.yml
workflow. There is one path: bump the version on a branch, merge to main, and the
workflow tags, releases, and publishes.
-
On a release branch, bump the version and update the changelog:
package.json: the newversionCHANGELOG.md: add a## [X.Y.Z](…compare/vPREV...vX.Y.Z) (DATE)section (the workflow extracts the GitHub release notes from this exact header)src/version.ts: regenerate withnpm run build:version(single-sourced frompackage.json)package-lock.json: refresh if dependencies changed
-
Run the release gate:
CI=1 npm run check:all
-
Open a PR, get CI green, and merge to
main. On that pushrelease.ymldetects thatmaincarries an unreleasedpackage.jsonversion with a matchingCHANGELOG.mdsection and no existing tag, then tagsvX.Y.Z, creates the GitHub release from that changelog section, and publishes to npm. -
npm publishing uses npm trusted publishing (OIDC) from GitHub Actions. Keep the package connected to this repository as a trusted publisher, and do not add a publish token to the workflow. The publish job validates on Node 22, then switches to Node 24 for the final
npm publish --provenancestep so npm uses an OIDC-capable CLI. -
To (re)publish an already-tagged version without changing
main, run theReleaseworkflow manually withpublish_tag=vX.Y.Z. -
If GitHub Actions release automation is unavailable, use the manual fallback:
node scripts/release.mjs <version> --commit --tag git push && git push --tags
-
Bump both exported package-version references:
tywrap_ir/pyproject.tomltywrap_ir/tywrap_ir/__init__.py
-
Keep
IR_VERSIONintywrap_ir/tywrap_ir/__init__.pyaligned with the current IR schema used bysrc/tywrap.ts. -
Validate the Python package:
python -m venv .venv-release ./.venv-release/bin/python -m pip install -e tywrap_ir PATH="$PWD/.venv-release/bin:$PATH" python -m unittest discover -s tywrap_ir/tests -p 'test_*.py' -v
-
Tag the merged
maincommit and push the tag:git tag tywrap-ir-v<version> git push origin tywrap-ir-v<version>
-
The
publish-pypi.ymlworkflow publishestywrap-irto PyPI from that tag.
tywrapandtywrap-irare versioned independently.tywraprelease tags usevX.Y.Z.tywrap-irrelease tags usetywrap-ir-vX.Y.Z.
X.Y.Z- stable releaseX.Y.Z-alpha.N- alphaX.Y.Z-beta.N- betaX.Y.Z-rc.N- release candidate