ci: run the release through the shared python-release reusable#128
Merged
Conversation
Replaces four hand-rolled jobs (10 step-level third-party actions) with one caller job and zero stray uses. Build, twine check, GitHub Release and the PyPI upload all move into netresearch/.github, so the pinned action versions stay maintained centrally. Nothing working is lost, because the publish path never worked: the repo has no Actions secrets at all, so PYPI_API_TOKEN and TEST_PYPI_API_TOKEN resolved to empty in every run, and there are no tags, no releases, and no cli-audit package registered on PyPI. Rather than carry a job that is guaranteed to fail, publishing is switched off and the two prerequisites are documented in the workflow: a PyPI Trusted Publisher for this repo, and the GitHub Environment it names (only `copilot` exists today). Flipping publish-pypi to true is then the whole change — the reusable uploads via OIDC, so no token is needed at all. Two behaviours the reusable could not express until now were added to it first (netresearch/.github#292), so they survive the migration: - release-files: attaches the sdist and wheel, as softprops/action-gh-release did via `files: dist/*`. - prerelease: auto — reproduces the previous contains(alpha|beta|rc) expression and additionally covers the PEP 440 spellings it missed. At 2.0.0-alpha.6 this is the normal case here. Dropped deliberately as local quirks: the CHANGELOG-derived release body (replaced by --generate-notes) and the separate TestPyPI dispatch path. Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Contributor
Dependency ReviewThe following issues were found:
License Issues.github/workflows/release.yml
OpenSSF Scorecard
Scanned Files
|
|
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 four hand-rolled jobs (10 step-level third-party actions) with one caller job and zero stray uses. Net −116/+39.
Nothing working is lost, because the publish path never worked
Verified against the repo, not assumed:
Rather than carry a job guaranteed to fail, publishing is switched off and the two prerequisites are documented in the workflow itself:
netresearch/coding_agent_cli_toolset, pointing at this workflow and the environment the reusable names;Flipping
publish-pypi: trueis then the entire change — the reusable uploads via OIDC, so no token is needed at all. That is a strictly better position than the secret-based setup this replaces.Two behaviours were added to the reusable first, so they survive
The audit found this repo was the only one in the fleet sweep whose release workflow mapped cleanly onto
python-release.yml— and even it could not migrate without netresearch/.github#292:softprops/action-gh-releasewithfiles: dist/*release-files: dist/*contains(github.ref, 'alpha'|'beta'|'rc')prerelease: autoautoreproduces the old expression and covers the PEP 440 spellings it missed (v1.2.3a1,v1.2.3rc2,v2.0.0.dev3), while not tripping on tags that merely contain those letters (v1.0.0-darcy,v1.0.0-developer). At version2.0.0-alpha.6prerelease tags are the normal case here, so this is not hypothetical.Dropped deliberately as local quirks
The CHANGELOG-derived release body (replaced by
--generate-notes) and the separate TestPyPI dispatch path.