Skip to content

ci: publish in the environment release - #571

Merged
uniqueg merged 1 commit into
devfrom
ci/release-environment
Oct 31, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/release-environment

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Renames the GitHub environments of the publishing jobs to release, as decided for the org:

  • .github/workflows/release.yml, job pypi (PyPI trusted publishing): pypi → release
  • .github/workflows/release-chart.yml, job publish (chart-v* tags): chart-release → release

The maintainer set up the environment release and registers the matching PyPI trusted publisher (workflow release.yml, environment release).

Comments and docs naming the environments follow: workflow header and job comments, docs/contributing.md ("Versioning and releases"), docs/helm-chart.md ("Releases"; the shared environment must allow both v* and chart-v* tags). No test names the environments.

Scope: the environment rename only. The release job-name alignment, the README image rewrite for PyPI and the image jobs' environments (dev-images, release) move to follow-up issues (milestone v0.20.0); #563 is updated accordingly.

Closes #563

Lane

Light lane: changes only the environment name (a configuration value) plus comments and docs; no logic, secrets, permissions or job structure change. Reviewed the diff by hand: both environment.name values are exactly release, and no occurrence of pypi or chart-release as an environment name is left.

Verification

  • mkdocs build --strict: passed
  • pytest tests/test_repository.py tests/test_release_assets.py tests/test_release_notes.py tests/test_docs_hooks.py: 151 passed
  • actionlint on both workflows: no findings
  • pre-commit hooks for the changed files, run directly (pre-commit could not fetch its hook repositories in the sandbox): YAML parse, whitespace (git diff --check), ast-grep scan, semgrep scan --config .semgrep: no findings
  • CI: all checks passed (run 41215785945)

Declined review findings

None.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Rename the publishing environments to release for consistent protected release deployments.

Enhancements:

  • Consolidate PyPI and Helm chart publishing approvals under the shared release GitHub environment.

Documentation:

  • Update release documentation and workflow guidance to describe the shared release environment and its tag restrictions.

Rename the GitHub environments of the publishing jobs to `release`:
the PyPI job of release.yml (was `pypi`) and the chart publish job of
release-chart.yml (was `chart-release`). PyPI trusted publishing binds
the environment name; the maintainer set up the environment and the
trusted publisher. Comments and docs follow.

Closes #563

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR changes only the GitHub Actions environment configuration for PyPI and Helm chart publishing, making both jobs use the preconfigured release environment. Related comments and documentation are updated to reflect the shared approval and tag protection rules; publishing logic, permissions, job structure, and secrets remain unchanged.

File-Level Changes

Change Details Files
Consolidate publishing jobs onto the organization-wide release GitHub environment.
  • Rename the PyPI publishing environment from pypi to release.
  • Rename the Helm chart publishing environment from chart-release to release.
  • Update workflow comments and release documentation to describe the shared environment and its v*/chart-v* tag protections.
.github/workflows/release.yml
.github/workflows/release-chart.yml
docs/contributing.md
docs/helm-chart.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d47edd7) to head (88a592d).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #571   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           56        56           
  Lines         7068      7068           
=========================================
  Hits          7068      7068           
Flag Coverage Δ
test_unit 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.

@uniqueg
uniqueg marked this pull request as ready for review October 31, 2026 15:52

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!

Linked issues

#563 ci: align the release job names · 2 of 5 met

# Requirement Status Notes
1 A prepare job named “Prepare release” holds all checks, and other jobs depend on it. ❌ Not addressed The workflow still uses build and has no prepare job; this PR says job-name alignment moves to follow-up issues.
2 Registry-publishing jobs are named after what they release and are unique across repository workflows. 🟡 Partly met The image and chart job names identify what they publish, but the PyPI job remains pypi / “Publish to PyPI” rather than being named after the package it releases.
3 publish / “Publish release” creates the GitHub release. ✅ Met The publish job is named “Publish release” and includes the release-creation step.
4 Use release for publishing and dev-images for CI pushes. 🟡 Partly met The PyPI and chart publishing jobs now use release, but the image publishing jobs and CI image pushes still have no environment configured.
5 Required checks remain unaffected; the ruleset requires only CI passed. ✅ Met The change only renames environment references and does not alter job IDs or required-check configuration.

Sourcery assessment

Needs a human reviewer. The publishing jobs now rely on the shared release environment for approval and deployment restrictions; if its protection rules or PyPI trusted-publishing configuration are wrong, releases could publish without the intended gate or fail to publish. Reverting the workflow would not retract package versions or artifacts already published to PyPI or GHCR.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit a0646bc into dev Oct 31, 2026
31 checks passed
@uniqueg
uniqueg deleted the ci/release-environment branch October 31, 2026 16:00
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.

ci: publish in the environment release

1 participant