Skip to content

Conversation

@ttypic
Copy link
Contributor

@ttypic ttypic commented Sep 18, 2025

  • Introduced a release workflow triggered on tag pushes matching semantic versioning.
  • Includes steps for building distributions, caching, publishing to PyPI and TestPyPI.
  • Utilizes poetry for dependency management and distribution building.

Summary by CodeRabbit

  • Chores
    • Added automated release pipeline to build and publish distributions to PyPI on version tags, with separate publishing to TestPyPI for pre-release validation.
    • Enabled manual dispatch to trigger publishing on demand.
    • Reuses built artifacts across steps for faster, more reliable releases.
    • Employs secure, environment-gated publishing with token-based authentication.
    • Improves dependency caching to speed up builds and reduce flakiness.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new GitHub Actions workflow (.github/workflows/release.yml) to build Python distributions with Poetry/unasync and publish artifacts to TestPyPI and, on tagged releases (vX.Y.Z*), to PyPI. It configures caching, builds wheel/sdist, stores artifacts, and uses OIDC for authenticated publishing via pypa/gh-action-pypi-publish.

Changes

Cohort / File(s) Summary of Changes
Release workflow (CI/CD)
\.github/workflows/release.yml
Introduces “Publish Python distribution to PyPI” workflow: triggers on workflow_dispatch and tag pushes; jobs for build (Python 3.12, Poetry 2.1.4, cache, unasync, build wheel/sdist, upload artifacts), publish-to-pypi (on tags, version check, OIDC publish), and publish-to-testpypi (OIDC publish).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant GH as GitHub Actions
    participant Build as build job
    participant Art as Artifacts
    participant TPY as TestPyPI
    participant PY as PyPI

    Dev->>GH: Push tag vX.Y.Z or manual dispatch
    GH->>Build: Start build (Python 3.12, Poetry 2.1.4)
    Build->>Build: Restore cache (poetry.lock)\nInstall deps (+crypto)\nRun unasync\nBuild wheel & sdist
    Build-->>Art: Upload dist artifacts

    rect rgba(230,240,255,0.5)
    note over GH,TPY: Always after build
    GH->>Art: Download artifacts
    GH->>TPY: Publish distributions (OIDC)
    end

    rect rgba(230,255,230,0.5)
    note over GH,PY: Only on tag push
    GH->>Art: Download artifacts
    GH->>GH: Validate tag == pyproject version
    GH->>PY: Publish distributions (OIDC)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I hopped through tags with careful cheer,
Packed wheels and sdists, crystal-clear.
To TestPyPI I sent a try,
Then PyPI on a versioned sky.
With Poetry’s charm and caches tight—
Release burrows built just right. 🐇✨

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-job

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 181ae3d and eadfdaa.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/624/features September 18, 2025 17:04 Inactive
- Introduced a release workflow triggered on tag pushes matching semantic versioning.
- Includes steps for building distributions, caching, publishing to PyPI and TestPyPI.
- Utilizes poetry for dependency management and distribution building.
@ttypic ttypic merged commit 924bd33 into main Sep 18, 2025
7 of 10 checks passed
@ttypic ttypic deleted the release-job branch September 18, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants