Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ jobs:
pip install build
python -m build

# Reed is not published to PyPI before v1.0.0; 0.x tags still get the image and a GitHub Release.
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !startsWith(github.ref, 'refs/tags/v0.')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Reed uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- The release workflow no longer publishes `v0.*` tags to PyPI. They still build and push the container image and create a GitHub Release. PyPI publishing starts at v1.0.0

## [0.6.1] - 2026-10-04

### Added
Expand Down
15 changes: 12 additions & 3 deletions tests/test_release_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,18 @@ def test_publish_and_release_steps_are_gated_on_real_tag_push_only(self):
if the logic were inverted."""
workflow = _load_release_workflow()
expected = "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')"
for step_name in ("Publish to PyPI", "Create GitHub Release"):
step = _find_step(workflow, step_name)
assert step.get("if", "").strip() == expected
release = _find_step(workflow, "Create GitHub Release")
assert release.get("if", "").strip() == expected
pypi = _find_step(workflow, "Publish to PyPI")
assert pypi.get("if", "").strip().startswith(expected)

def test_pypi_publish_is_blocked_for_pre_v1_tags(self):
"""Reed is not published to PyPI before v1.0.0 (maintainer decision).
0.x tags still build the image and create a GitHub Release, but the
PyPI step must carry an explicit exclusion for `v0.` tags."""
workflow = _load_release_workflow()
condition = _find_step(workflow, "Publish to PyPI").get("if", "")
assert "!startsWith(github.ref, 'refs/tags/v0.')" in condition

def test_publish_to_pypi_skips_existing_to_survive_a_retry(self):
"""If a later step (e.g. Create GitHub Release) fails after PyPI
Expand Down
Loading