Skip to content

Automate PyPI publishing and document the contribution and release process - #67

Merged
smmaurer merged 1 commit into
mainfrom
maintenance/publish-workflow
Sep 16, 2026
Merged

smmaurer merged 1 commit into
mainfrom
maintenance/publish-workflow

Conversation

@smmaurer

Copy link
Copy Markdown
Member

Summary

Sets up the release mechanics ahead of the 1.9 release, following the pattern established in ChoiceModels 0.3 and UrbanSim 3.3 and tracked here in #63: a release PR goes to main, a v* tag and GitHub release trigger a build, verification, and upload to PyPI via Trusted Publishing, and merging to main never publishes.

  • .github/workflows/publish.yml (new, copied from UrbanSim's). Runs when a GitHub release is published, or manually as a build-only dry run.
    • build job: python -m build, twine check --strict, installs the wheel, runs tests, and saves the distributions as an artifact.
    • publish job: uploads the artifact to PyPI with pypa/gh-action-pypi-publish.
  • CONTRIBUTING.md: workflow updates.
  • Version 1.9.dev2, with a changelog entry.

One-time setup before the first release

  • On PyPI, add a trusted publisher for the orca project: owner UDST, repository orca, workflow publish.yml, environment pypi.
  • On GitHub, create the pypi environment with required reviewers (the maintainers who approve releases).

Plan after merging

Release PR for 1.9rc1 → tag v1.9rc1 → GitHub pre-release → approve the pypi deployment → pip install --pre orca==1.9rc1 in a fresh environment. Then the same for 1.9.

…ocess

Add a Publish workflow that runs when a GitHub release is published: it
builds the source distribution and wheel, checks them with twine,
installs the wheel and runs the test suite against it from outside the
source tree, confirms that the package version matches the release tag
and that pre-release versions are marked as such, and then uploads the
files to PyPI with Trusted Publishing after approval in the protected
"pypi" environment. Merging to main never publishes. The workflow can
also be run manually as a build-only dry run.

Replace the 2014 style guide in CONTRIBUTING.md with the contribution,
versioning, release, PyPI, and conda-forge instructions used across
UDST, adapted to this repository's layout. Bump the version to 1.9.dev2
and add a changelog entry.
@smmaurer
smmaurer merged commit 6dfb671 into main Sep 16, 2026
7 checks passed
@smmaurer
smmaurer deleted the maintenance/publish-workflow branch September 16, 2026 22:25
@smmaurer smmaurer mentioned this pull request Sep 16, 2026
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.

1 participant