Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate releases #10

Open
merwok opened this issue Oct 23, 2017 · 2 comments
Open

Automate releases #10

merwok opened this issue Oct 23, 2017 · 2 comments
Labels

Comments

@merwok
Copy link
Contributor

merwok commented Oct 23, 2017

Proposal:

  • Normal PRs go into a develop branch (git-flow style)
  • To make a release, we use bumpversion to update files and make a PR to master
  • The CI system already runs setup.py check, safety check, check-manifest for all branches
  • For release branches, we could push sdist and wheel to TestPyPI (or a Caravan devpi server)
  • When the PR is merged, CircleCI makes a tag (unsigned?), pushes it to the repo and uses twine to push wheel and sdist to PyPI
@merwok
Copy link
Contributor Author

merwok commented Feb 17, 2018

Refined proposal

Pre-release

  • Pre-release is a PR from a branch derived from develop into master named like release/something (git-flow again)
  • A CI workflow for this branch pattern runs bumpversion and other needed commands, commits and pushes to the PR

Release tagging

  • A dev merges the PR
  • CI runs for master, with an extra job that creates a tag and pushes it

Release publication

  • A workflow configured for tags only creates the sdist and wheel
  • These are pushed to PyPI or to CircleCI artifacts if some testing flag is set
  • A branch to merge master into dev (+ version bumped to a dev number) is created
  • A PR is opened

Nice properties:

  • The bot account needs write permissions but only pushes tags or non-master branches
  • PRs are protected by status checks and merged by humans
  • Boring tasks are done by a bot
  • Released artifacts == git tags == PR merge commits on master

Edit: this matches official recommendations https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/

@merwok merwok added the infra label Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant