Skip to content

CI: publish to PyPI on release only - #12

Merged
SushantGautam merged 2 commits into
mainfrom
ci/pypi-release
Nov 3, 2026
Merged

SushantGautam merged 2 commits into
mainfrom
ci/pypi-release

Conversation

@SushantGautam

@SushantGautam SushantGautam commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Adds .github/workflows/pypi.yml. It runs only when a GitHub Release is published, never on a push or a PR.

build job:

  • Fails if the release tag (v0.1.1) doesn't match both the pyproject.toml version and verdi.__version__.
  • Then runs ruff and pytest, builds, and runs twine check --strict.

publish job:

  • Uploads through PyPI trusted publishing (OIDC). No API token is stored in GitHub.
  • Uses the pypi environment.

One-time setup on PyPI (needs a project owner):

  1. Go to https://pypi.org/manage/project/verdi-agents/settings/publishing/
  2. Add a GitHub publisher: owner SimulaMet, repository Verdi, workflow pypi.yml, environment pypi.

Also adds a short Releasing section to the README.

Test plan

  • The workflow YAML parses; triggers on release only; jobs build → publish.
  • Version check run locally: v0.1.0 passes and v0.1.1 fails, as expected while the version is 0.1.0.
  • twine check --strict passes on the 0.1.0 build.
  • Not run end to end. The first real run will be the next release, after the PyPI publisher is set up.

Also: ci.yml now runs for main only. The stale dev/institutional-recovery entry is removed; that branch was merged in #4 and deleted.

New pypi.yml runs on release: published. It fails if the tag differs from
the package version, runs ruff and tests, builds, twine check --strict, then
uploads via PyPI trusted publishing (OIDC, environment "pypi", no stored token).
Copilot AI balanced review requested due to automatic review settings November 3, 2026 22:27

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 insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

dev/institutional-recovery was merged in #4 and deleted; all work lands on main.
@SushantGautam
SushantGautam merged commit 6fe426b into main Nov 3, 2026
1 check passed
@SushantGautam SushantGautam mentioned this pull request Nov 3, 2026
@SushantGautam
SushantGautam deleted the ci/pypi-release branch November 3, 2026 22:50
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