Skip to content

Add a GitHub Release step to the release workflow - #7

Merged
Dreamsorcerer merged 2 commits into
aio-libs:masterfrom
rodrigobnogueira:add-github-release-step
Jun 22, 2026
Merged

Dreamsorcerer merged 2 commits into
aio-libs:masterfrom
rodrigobnogueira:add-github-release-step

Conversation

@rodrigobnogueira

@rodrigobnogueira rodrigobnogueira commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

What do these changes do?

On a v* tag push, the publish-pypi job now creates a GitHub Release in addition to publishing to PyPI, mirroring aiohttp's deploy job:

  • grant contents: write, check out the repo, and guard against a pre-existing release so a re-run after a partial failure doesn't fail with HTTP 422;
  • create the release with aio-libs/create-release@v1.6.6 — the version's CHANGES.rst notes plus the built sdist + wheel;
  • sign the distributions with Sigstore (sigstore/gh-action-sigstore-python) and upload the signatures to the release (softprops/action-gh-release).

The existing PyPI Trusted-Publishing step is unchanged.

Before the first release (process, not changed here)

create-release reads the version from __version__ and the notes from the matching CHANGES.rst section. So before tagging: run towncrier to build the version's section (currently only the header + the towncrier release notes start marker), and make sure __version__ matches the tag. Heads-up: there is a v0.0.1 tag with no Release while __version__ is 0.1.0 — reconcile (or remove the tag) before the first real release.

Testing

Only runs on a real v* tag, so the PR's own CI can't exercise it; validated statically (the workflow YAML parses, the job graph stays lint+test → check → build → publish, and CHANGES.rst/__version__ are present for create-release). The idempotency guard makes re-runs after a partial failure safe.


Drafted with Claude Code (Opus 4.8); reviewed by @rodrigobnogueira.

Extend the tag-triggered publish job to create a GitHub Release alongside
the PyPI upload, mirroring aiohttp's deploy job: grant contents: write,
check out the repo, guard against a pre-existing release so a re-run after
a partial failure does not fail with HTTP 422, and create the release with
aio-libs/create-release -- using the version's CHANGES.rst notes and
attaching the built distributions.
@codecov

codecov Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4976e57) to head (4ce7031).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          171       171           
  Branches        38        38           
=========================================
  Hits           171       171           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dreamsorcerer
Dreamsorcerer merged commit 5bf6380 into aio-libs:master Jun 22, 2026
12 checks passed
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.

2 participants