Skip to content

Release Workflow

Marshall McDonnell edited this page Mar 1, 2022 · 6 revisions

Merge latest PRs

  • Merge latest Pull Requests into master that are for the latest release
  • Pull Requests and Bug Fixes go directly into master after basic testing

Test release

Prepare test release

  • update master from remote
    • git pull origin master
  • make sure version is updated in pyproject.toml
    • under the [tool.poetry], update the version to the "vMAJOR.MINOR.PATCH-alpha.ITERATION"
    • Example for v0.2.6-apha.1:
[tool.poetry]
name = "SciDataLib"
version = "v0.2.6-alpha.1"
...
  • if this was not done, commit this change before tagging
  • create the test tag
    • "test-vMAJOR.MINOR.PATCH-alpha.ITERATION"
    • e.g. git tag test-v1.2.3-alpha.4

Automatically deploy test release via tag to TestPyPi

  • after creating the test tag previously, push latest tags
    • git push --tags
  • check GitHub Actions release
    • pushing the tag will initiate the GitHub Actions .github/workflows/test-releases.yml workflow, called "Release to TestPyPi"
    • ensure the "Build Python package and Upload to TestPyPi" setup completes successfully to upload to the package to TestPyPi
    • look for the new package on the SciDataLib TestPyPi list: https://test.pypi.org/project/scidatalib/#history

Manually deploy test release to TestPyPi

  • after creating the test tag previously, prepare the release using poetry:
poetry build
  • configure the TestPyPi for publication of the package:
poetry config repositories.testpypi https://test.pypi.org/legacy/
  • publish the package using USERNAME and PASSWORD:
poetry publish -r testpypi --username "<USERNAME>" --password "<PASSWORD>"

Release

Prepare release

  • update master from remote
    • git pull origin master
  • make sure version is updated in pyproject.toml
    • under the [tool.poetry], update the version to the "vMAJOR.MINOR.PATCH"
    • Example for v0.2.6:
[tool.poetry]
name = "SciDataLib"
version = "v0.2.6"
...
  • if this was not done, commit this change before tagging
  • create the tag
    • "test-vMAJOR.MINOR.PATCH"
    • e.g. git tag v0.2.6

Automatically deploy release via tag to PyPi

  • after creating the test tag previously, push latest tags
    • git push --tags
  • check GitHub Actions release
    • pushing the tag will initiate the GitHub Actions .github/workflows/releases.yml workflow, called "Release to PyPi"
    • ensure the "Build Python package and Upload to PyPi" setup completes successfully to upload to the package to PyPi
    • look for the new package on the SciDataLib PyPi list: https://pypi.org/project/scidatalib/#history

Manually deploy release to PyPi

  • after creating the test tag previously, prepare the release using poetry:
poetry build
  • publish the package using USERNAME and PASSWORD:
poetry publish --username "<USERNAME>" --password "<PASSWORD>"

Clone this wiki locally