Repository navigation
One release pipeline: publishing a GitHub Release does the rest (D6) - #58
Merged
Merged
Conversation
- .github/workflows/release.yml: on a published release, build the wheel and sdist from the tag, check them, install the wheel in a clean venv, upload to PyPI with Trusted Publishing (OIDC, environment 'pypi', no token), attach them to the release and fill empty release notes from CHANGELOG.md. Dry run on PRs touching packaging, or by hand. - scripts/release/check_release.py: tag = v<version>, dated CHANGELOG section and compare link, docs badge, wheel top level / GUI data files / no CRLF, sdist without desktop build output. Writes the release notes. Tests in tests/test_release_check.py. - RELEASING.md: the release PR, the one button, what to do if a step fails, and the one-time PyPI trusted publisher setup. Linked from CONTRIBUTING.md. - Download page: what each version (web, desktop, pip) can do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Roadmap D6. After this PR, making a release takes two steps: merge the release PR, then publish a GitHub Release. The tag push, local build, twine upload and PyPI token all go away.
.github/workflows/release.yml, triggered when a Release is published:id-token: writeonly. There is no token in the repo, and the job uses the environmentpypi.skip-existingmeans a version already on PyPI isn't treated as an error.desktop-builds.ymlalready attaches the installers on the same event, so this needs no change.scripts/release/check_release.pyautomates the release checks that used to be done by hand:v<__version__>;## [X.Y.Z] - datesection and a compare link;top_level.txtiseagleplotonly, with nothing installed outside it (G-011); the GUI data files are present (G-012); no Windows line endings (G-032);--noteswrites the release notes.tests/test_release_check.py(15 tests):secrets..RELEASING.md: the release PR checklist, the one button (with the "Save draft starts nothing" trap from G-035), what to do if a step fails, and the one-time PyPI setup. Linked fromCONTRIBUTING.md.Needed once, by the owner
On pypi.org, in eagleplot's settings, go to Publishing → Add a new publisher → GitHub and enter:
The-Schultz-Labeagleplotrelease.ymlpypiUntil that's done, the PyPI job of the next release will fail with a clear "trusted publisher" error and nothing will be uploaded. The other jobs are unaffected.
Test plan
check_release.pypasses on the real 3.2.0 build, on both my wheel and the one on PyPI (Python 3.13 and 3.9).tests/test_release_check.py: 15 passed on Python 3.13 and 3.9. Docs tests pass. ruff and mypy are clean.🤖 Generated with Claude Code