Skip to content

Latest commit

 

History

History
156 lines (107 loc) · 3.14 KB

RELEASE.md

File metadata and controls

156 lines (107 loc) · 3.14 KB

Release instructions

Before creating a new release please do a careful consideration about the version number for the new release. We are following Semantic Versioning and PEP440.

  • Install twine for pypi package uploads and update poetry

    python3 -m pip install --user --upgrade twine poetry
  • Fetch upstream changes and create release branch

    git fetch upstream
    git checkout -b create-new-release upstream/master
  • Open pyproject.toml and increment the version number at the [tool.poetry] section.

  • Update CHANGELOG.md

    • Change [unreleased] to new release version
    • Add a release date
    • Update reference to Github diff
  • Create a source and wheel distribution

    rm -rf dist build gvm_tools.egg-info
    poetry build
  • Create a git commit

    git add .
    git commit -m "Prepare release <version>"
  • Create a pypi configuration file

    vim ~/.pypirc

    with the following content (Note: <username> must be replaced)

    [distutils]
    index-servers =
        pypi
        testpypi
    
    [pypi]
    username = <username>
    
    [testpypi]
    repository = https://test.pypi.org/legacy/
    username = <username>
    
  • Create an account at Test PyPI

  • Upload the archives in dist to Test PyPI

    twine upload -r testpypi dist/*
  • Check if the package is available at https://test.pypi.org/project/gvm-tools

  • Create a test directory

    mkdir gvm-tools-install-test
    cd gvm-tools-install-test
    python3 -m venv test-env 
    source test-env/bin/activate
    pip install --pre -I --extra-index-url https://test.pypi.org/simple/ gvm-tools
  • Check install version with a python script

    python3 -c "from gvmtools import get_version; print(get_version())"
  • Remove test environment

    cd ..
    rm -rf gvm-tools-install-test
  • Create a release PR

    git push origin

    Open GitHub and create a PR against https://github.com/greenbone/gvm-tools

  • Update after PR is merged

    git fetch upstream
    git rebase upstream/master master
  • Create a git tag

    git tag v<version>

    or even signed with your gpg key

    git tag -s v<version>
  • Create final distribution files

    poetry build
  • Create an account at PyPI if not exist already

  • Upload to real PyPI

    twine upload dist/*
  • Check if new version is available at https://pypi.org/project/gvm-tools

  • Update version in pyproject.toml

    Use a development version like "22.4.dev1"

  • Create a commit

    git commit -m "Update version after <version> release"
  • Push changes and tag to Github

    git push --tags upstream master
  • Create a Github release

    See https://help.github.com/articles/creating-releases/