Maintainer notes. Users don't need anything here — see README.md.
Pushing a v* tag runs .github/workflows/release.yml:
-
Version — derived from the tag itself by hatch-vcs (
dynamic = ["version"]); there is no version string to keep in sync. -
Build wheels — all cross-build on a single
ubuntu-latestrunner (a wheel just zips the matching binary, SHA-256-verified at build time, thenwheel tagsforces the platform tag; the build host's OS/arch is irrelevant, same as upstream gomc-rest cross-compiling from Linux):win_amd64—gomc-rest.exemanylinux_2_34_x86_64—gomc-rest-linux-amd64(dynamically linked, needs glibc ≥ 2.34; hence the 2_34 tag)manylinux2014_aarch64—gomc-rest-linux-arm64(statically linked)macosx_12_0_x86_64—gomc-rest-darwin-amd64(unsigned)macosx_12_0_arm64—gomc-rest-darwin-arm64(ad-hoc signed)
Both darwin binaries declare a minimum OS of macOS 12 via
LC_BUILD_VERSION, hence themacosx_12_0tags.ci.yml'stest-macosjob actually launches the server on a realmacos-14(Apple Silicon) runner every PR — the authoritative check for Gatekeeper/signing on arm64. The Intel binary is verified offline only (SHA-256 + Mach-O inspection); GitHub's Intel macOS runners are not reliably schedulable, so we don't gate on them. -
Build sdist — no binary; the client-only fallback for platforms without a wheel (Windows arm64, older glibc, macOS < 12).
-
Publish to PyPI — trusted publishing (OIDC) via the
pypienvironment.skip-existingmakes re-running a tag safe. -
GitHub Release — created only after PyPI publish succeeds, with generated notes and all dist files attached as assets.
workflow_dispatch runs the builds for verification but never publishes.
Tag main and push — that's all. The version comes from the tag
(hatch-vcs), and __version__ reads the installed package metadata, so
there is nothing to bump anywhere.
git tag v0.2.0
git push origin v0.2.0Untagged builds get a dev version like 0.1.3.dev2+g1234abc — handy for
telling local builds apart from releases.
If publish fails transiently, re-run the failed jobs for that tag's run from the GitHub Actions UI — PyPI skips files it already has, and the release job then attaches the assets. Only delete and recreate the tag if the fix requires new commits (which means a new version anyway).
Only needed when changing the bundled server version:
- Edit
GOMC_REST_VERSION. Keep it within the range accepted by the pinnedgomc-rest-client(itsMINIMUM_SUPPORTED_GOMC_REST_VERSION); bump the client pin inpyproject.tomltogether if needed. - Add
checksums/<version>.sha256with the trusted SHA-256 of each release asset (gomc-rest.exe,gomc-rest-linux-amd64,gomc-rest-linux-arm64,gomc-rest-darwin-amd64,gomc-rest-darwin-arm64). These are committed so a swapped release asset is detected; vendoring fails closed without them. - If the Linux binaries change their glibc requirement (check with
readelf -V <binary> | grep GLIBC), update theplattags inrelease.ymland the CI floor test image inci.yml. If the darwin binaries change their minimum OS (check withotool -l <binary> | grep -A3 LC_BUILD_VERSION, or parse the load command directly), update themacosx_*tags inrelease.yml.
python scripts/vendor_binaries.py # fetch + verify all binaries
python -m build --wheel
python -m wheel tags --platform-tag manylinux_2_34_x86_64 --remove dist/*.whl
rm src/gomc_rest/binaries/gomc-rest* # drop vendored binaries for a clean sdist
python -m build --sdist- PyPI trusted publisher: repo
Moge800/gomc_rest_python, workflowrelease.yml, environmentpypi. - GitHub environment
pypion the repository.