Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.92 KB

RELEASE.md

File metadata and controls

68 lines (51 loc) · 1.92 KB

How to make a release

docker-image-cleaner is a package available on PyPI. These are instructions on how to make a release on PyPI. The PyPI release is done automatically by a GitHub workflow when a tag is pushed.

For you to follow along according to these instructions, you need:

Steps to make a release

  1. Checkout main and make sure it is up to date.

    ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo
    git checkout main
    git fetch $ORIGIN main
    git reset --hard $ORIGIN/main
    # WARNING! This next command deletes any untracked files in the repo
    git clean -xfd
  2. Update CHANGELOG.md with the help of the github-activity utility.

  3. Set the version variable in setup.py appropriately and make a commit.

    git add setup.py
    VERSION=...  # e.g. 1.2.3
    git commit -m "release $VERSION"
    
  4. Reset the version variable in setup.py appropriately with an incremented patch version and a .dev1 element, then make a commit.

    git add setup.py
    git commit -m "back to dev"
    
  5. Push your two commits to main.

    # first push commits without a tags to ensure the
    # commits comes through, because a tag can otherwise
    # be pushed all alone without company of rejected
    # commits, and we want have our tagged release coupled
    # with a specific commit in main
    git push $ORIGIN main
  6. Create a git tag for the pushed release commit and push it.

    git tag -a $VERSION -m $VERSION HEAD~1
    
    # then verify you tagged the right commit
    git log
    
    # then push it
    git push $ORIGIN refs/tags/$VERSION