Skip to content

ci: run the release through the shared python-release reusable#128

Merged
CybotTM merged 1 commit into
mainfrom
ci/release-via-shared-reusable
Jul 23, 2026
Merged

ci: run the release through the shared python-release reusable#128
CybotTM merged 1 commit into
mainfrom
ci/release-via-shared-reusable

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 23, 2026

Copy link
Copy Markdown
Member

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:

Actions secrets : none          <- PYPI_API_TOKEN / TEST_PYPI_API_TOKEN resolved to empty
tags            : 0
releases        : 0
environments    : copilot       <- no `pypi` environment
pypi.org/cli-audit : HTTP 404

Rather than carry a job guaranteed to fail, publishing is switched off and the two prerequisites are documented in the workflow itself:

  1. a PyPI Trusted Publisher for netresearch/coding_agent_cli_toolset, pointing at this workflow and the environment the reusable names;
  2. that GitHub Environment.

Flipping publish-pypi: true is 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:

before after
release assets softprops/action-gh-release with files: dist/* release-files: dist/*
prerelease contains(github.ref, 'alpha'|'beta'|'rc') prerelease: auto

auto reproduces 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 version 2.0.0-alpha.6 prerelease 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.

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>
Copilot AI review requested due to automatic review settings July 23, 2026 15:57
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/release.yml

PackageVersionLicenseIssue Type
netresearch/.github/.github/workflows/python-release.ymlmainNullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
actions/netresearch/.github/.github/workflows/python-release.yml main UnknownUnknown

Scanned Files

  • .github/workflows/release.yml

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit e0404a5 into main Jul 23, 2026
24 of 25 checks passed
@CybotTM
CybotTM deleted the ci/release-via-shared-reusable branch July 23, 2026 16:33
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