Skip to content

publish.yml: release by pushing a tag - tests, PyPI, then the GitHub release - #7

Merged
joszamama merged 1 commit into
mainfrom
publish-pipeline
Oct 9, 2026
Merged

joszamama merged 1 commit into
mainfrom
publish-pipeline

Conversation

@joszamama

Copy link
Copy Markdown
Member

Until now a release of the CLI was made by clicking "Publish release" on GitHub, which started two things at once: the upload to PyPI (publish.yml, with no test in front of it) and the Zenodo record, which is permanent. A release with failing tests, or one whose upload to PyPI failed, would still have got its DOI.

A release is now made by pushing a tag vX.Y.Z (RELEASING.md), in this order, each step only if the one before it passed:

  1. tests: tests.yml, called: Linux, macOS and Windows, Python 3.11 and 3.14, and the type check;
  2. build: the commit must be on main, the tag must match the version in pyproject.toml, the package builds and passes twine check;
  3. publish: PyPI, as before (the pypi environment and PYPI_API_TOKEN);
  4. release: the GitHub release, last, with the files of the package attached and the message of the (annotated) tag as its notes; a lightweight tag gets generated notes. Zenodo archives it now.

A release made by hand on GitHub no longer uploads to PyPI. A run started by hand from Actions does steps 1 and 2 and stops.

Tested: actionlint is clean. A run by hand on this branch (https://github.com/fandango-fuzzer/fanbase-cli/actions/runs/37906449308): all seven test jobs and the build passed in 5 minutes, publish and release were skipped, and nothing went to PyPI or GitHub.

Not tested (they only happen on a real tag): the upload from the new artifact layout, and gh release create with the package attached and --verify-tag. The first real release through it is their test. A tag that fails before PyPI can be deleted and made again (RELEASING.md).

publish.yml runs on a tag vX.Y.Z. It calls tests.yml (all systems and the type check), builds from a commit that
is on main and whose version is the tag's, uploads to PyPI, and only then creates the GitHub release, with the
files of the package attached and the message of the tag as its notes. The release is last because the Zenodo
integration archives a release under a permanent DOI the moment it is published; until now a release made by
hand came first, and started the upload to PyPI and the DOI together, tested or not.

A run started by hand does the tests and the build and stops. RELEASING.md says how to make a release.
@joszamama
joszamama merged commit 83c09c4 into main Oct 9, 2026
17 checks passed
@joszamama
joszamama deleted the publish-pipeline branch October 9, 2026 08:47
@joszamama joszamama mentioned this pull request Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant