release
Cut a transformers-mic (tmic) release to PyPI. Updates CHANGELOG.md and the single pyproject version, runs the tests and a packaged smoke test, pushes the vX.Y-release branch and, after confirmation, the vX.Y.Z tag that publishes through GitHub OIDC, then opens the next version on main. Use when asked to release tmic, cut a version, or ship X.Y.Z.
Release transformers-mic
The procedure and its reasons are in docs/release.md; this is the checklist. CI publishes: pushing the vX.Y.Z
tag runs .github/workflows/release.yml, which builds, tests and uploads to PyPI through trusted publishing.
Input
<version>:X.Y.Z, orX.Y.ZrcNfor a pre-release.
Rules
- Start from a clean, up-to-date
main. Never release uncommitted changes. - Never run
twine upload. Publishing is CI-only, from the tag. - Ask the user before pushing the tag. It publishes, and a PyPI version can never be reused.
pyproject.toml[project].versionis the only version string. Do not add another, and do not bumpDEFAULT_BASE_VERSIONinsrc/transformers_mic/_version.py.- Land changes on
mainthrough PRs, not direct pushes.
Steps
- Preflight.
git fetch && git statusonmain;<version>must be above the latest tag (git tag). For a first release, confirm with the user that the PyPI pending publisher and thepypi-releaseGitHub environment exist (gh api repos/huggingface/transformers-mic/environments). - Changelog. Add
## [X.Y.Z] - YYYY-MM-DD(today) above the previous release inCHANGELOG.md, fromgit log vPREV..HEAD --oneline. Use### Added/### Changed/### Fixed; one line per user-visible change, linking PRs where useful. Fold an existing## [Unreleased]section into it. - Version. Set
[project].versioninpyproject.tomlto<version>. - Test and build in a Python 3.11 venv with
pip install -e ".[runtime,dev]":make test make build-release python -m twine check --strict dist/* - Smoke-test the wheel from outside the checkout:
python3.11 -m venv /tmp/tmic-release && /tmp/tmic-release/bin/pip install dist/*.whl cd /tmp && /tmp/tmic-release/bin/tmic --version && /tmp/tmic-release/bin/tmic run --help > /dev/nulltmic --versionmust print exactly<version>. - Land the bump on
main: branchrelease-X.Y.Z, commitRelease X.Y.Z, PR, squash-merge. - Release branch. New minor:
git switch main && git pull --ff-only && git switch -c vX.Y-release && git push -u origin vX.Y-release. Patch: fast-forward the existing branch frommainand push. Wait for theReleaserun on the branch to pass (gh run list --repo huggingface/transformers-mic --workflow release.yml). - Tag, after the user confirms, from
vX.Y-release:
The publish job may wait for a reviewer on thegit tag vX.Y.Z -m "Release vX.Y.Z" && git push origin vX.Y.Z gh run watch --repo huggingface/transformers-micpypi-releaseenvironment; say so instead of waiting silently. - Verify in a fresh venv:
pip install "transformers-mic==X.Y.Z"thentmic --version. - Next version. PR on
main:[project].versiontoX.Y.(Z+1)and an empty## [Unreleased]heading inCHANGELOG.md, commitStarting version NEXT. Not tagged, not merged into the release branch.
Files of this skill
This skill has no supporting files.