Repository navigation
Rework the release workflow with a tag-version check, a TestPyPI dry run and a GitHub release - #14
Merged
Merged
Conversation
…, TestPyPI dry run by dispatch, PyPI publish behind the pypi environment and a GitHub release
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.
Replaces the upstream
release.yml, which built on av*tag and published straight to PyPI.build and check: on a tag, fails unless the tag equalsvplusdiskcache.__version__(read fromdiskcache/__init__.pywithout importing it); builds the sdist and wheel;twine check --strict; installs the wheel in a fresh venv and imports it with-W error; uploadsdist/as an artifact.publish to TestPyPI (dry run): runs only onworkflow_dispatch, behind thetestpypienvironment, with trusted publishing.publish to PyPI: runs only on a tag, behind thepypienvironment, with trusted publishing and attestations.GitHub release: after the PyPI publish, creates the release for the tag with that version's section ofCHANGELOG.mdas the notes and the distributions attached, using the workflow token withcontents: writeon that job only.Nothing runs until a tag is pushed or a dispatch is triggered. Before the first release, the
pypiandtestpypienvironments need their required reviewer, the pending publishers must exist on PyPI and TestPyPI (projectdiskcache-community, ownersecondwindoss, workflowrelease.yml, matching environment names), andpypa/gh-action-pypi-publish@*must be added to the repository's Actions allow-list, which is deliberately limited to GitHub-owned actions today.Validated locally: the YAML parses, the version regex finds
5.6.3, and the changelog extraction falls back to a pointer when the version section does not exist yet.