Releasing subtr-actor
June 3, 2026 · View on GitHub
This document describes how to release new versions of subtr-actor to GitHub Releases, crates.io, PyPI, and npm.
Overview
The project publishes five packages:
- Rust:
subtr-actoron crates.io - Python:
subtr-actor-pyon PyPI - JavaScript bindings:
@rlrml/subtr-actoron npm - JavaScript player:
@rlrml/playeron npm - JavaScript stats player:
@rlrml/stats-playeron npm
Automated Releases (GitHub Actions)
When you push a tag starting with v (for example, v<version>), the following workflows run automatically:
GitHub (release-github.yml)
Creates or updates the GitHub Release page for the tag using the matching
section from CHANGELOG.md.
Rust (release-rust.yml)
Publishes the Rust crate to crates.io.
Python (release-python.yml)
Builds wheels for multiple platforms:
- Linux x86_64 (manylinux) - compatible with AWS Lambda, Docker, etc.
- Linux aarch64 (ARM)
- Windows x86_64
- macOS x86_64 and arm64
- Source distribution (sdist)
All artifacts are published to PyPI.
JavaScript (release-js.yml)
Builds the WebAssembly bindings package, builds the player package, smoke-tests the packed player artifact in a fresh consumer app, builds the stats player package, smoke-tests that packed artifact in a fresh consumer app, and publishes all three npm packages.
Setup Required (One-Time)
PyPI Publishing
Option A: Trusted Publishing (Recommended)
- Go to PyPI → Account Settings → Publishing
- Add a new pending publisher:
- Owner:
rlrml - Repository:
subtr-actor - Workflow:
release-python.yml - Environment:
pypi
- Owner:
Option B: API Token
- Create a PyPI API token at https://pypi.org/manage/account/token/
- Add it as a GitHub secret named
PYPI_TOKEN - Update the workflow to use the token instead of trusted publishing
npm Publishing
- Create an npm access token at https://www.npmjs.com/settings/~/tokens
- Add it as a GitHub secret named
NPM_TOKEN
How to Release
1. Update Version Numbers
Set the Cargo workspace version and synchronize every duplicated release metadata file from that source of truth:
VERSION=${VERSION:?set VERSION to the target release}
python3 scripts/sync_release_versions.py "$VERSION"
python3 scripts/check_release_versions.py
Or use the justfile helper:
VERSION=${VERSION:?set VERSION to the target release}
just bump "$VERSION"
2. Commit and Tag
VERSION=${VERSION:?set VERSION to the target release}
git add -A
git commit -m "Release v$VERSION"
git tag "v$VERSION"
git push origin master --tags
3. Monitor the Release
- Go to the repository's Actions tab
- Watch the
Release GitHub,Release Rust,Release Python, andRelease JavaScriptworkflows - Once complete, verify packages are available:
Manual Release (Alternative)
If you need to release manually:
Python
cd python
maturin build --release
twine upload target/wheels/*
JavaScript
cd js
wasm-pack build --target bundler --out-dir pkg
cd pkg && npm publish --access public
cd ../player
package_dir="$(npm run --silent prepare:package)"
(cd "$package_dir" && npm publish --access public)
cd ../stat-evaluation-player
package_dir="$(npm run --silent prepare:package)"
(cd "$package_dir" && npm publish --access public)
Troubleshooting
Python wheel build fails
- Ensure Rust toolchain is installed
- Check maturin version compatibility in
pyproject.toml
Linux wheel missing
- The
manylinux: autosetting should produce compatible wheels - If issues persist, try
manylinux: 2014ormanylinux: 2_28
npm publish fails
- Verify
NPM_TOKENsecret is set - Check that the package name isn't taken
- Ensure version number is incremented