Release procedure

Test phase

  • Decide whether it’s a major, minor, or patch increment, and set the MAJOR.MINOR.PATCH version number in CMakeLists.txt
  • Declare feature freeze
  • Release new versions of library dependencies (heinz, ff) if they have changed
  • Start release branch
  • Update CHANGELOG
  • Build packages, and test them
    • installation procedures according to webdocs
    • run Python scripts
  • Start new branch in ba-www, and write release letter (content/news/release-*.md)

Finalize release

  • Finalize bornagain (MRs against release branch):
    • Finalize CHANGELOG
    • In hugo/hugo.toml, set release_number to MAJOR.MINOR.PATCH and baseURL to https://bornagainproject.org/MAJOR.MINOR
  • After merger into release branch, set git tag vMAJOR.MINOR.PATCH

Finalize ba-www (in fresh release branch):

  • Finalize release letter
  • Update content/documentation.md
  • Update static/js/version_switch.js
  • In hugo.toml, update version_mmp for the release and version_mm for the documentation path
  • Hold back MR until everything else is ready

Upload wheels

Wheels are built automatically by CI when the git tag is pushed. They are published for Linux (manylinux) and Windows across all supported Python versions. macOS is distributed through the Homebrew formula.

To download the artifacts and push them to PyPI, run from the BornAgain source directory:

export TWINE_TOKEN=<PyPI API token>
./scripts/pypi-push

The script fetches all wheel artifacts from the CI pipeline for the latest tag, lists them with sizes, and asks for confirmation before uploading. This creates a new version on PyPI and is irreversible.

Zenodo deposit

Run zenodo-push from the scg-intern repository:

export ZENODO_TOKEN=<Zenodo API token>
zenodo-push

The script archives the latest tagged commit, uploads it to Zenodo, and publishes the record.

Publish

  • Create release in Jugit

  • Add the versioned BornAgain formula to mlz/homebrew, pin the BornAgain and library dependency tags and revisions, and run brew install and brew test for the formula

  • As www on @scg3, use MAJOR.MINOR for documentation directories:

    cd ~/ba
    cp -pr <old_version>/repo <new_version>/repo; # for hotfix, use extant directory
    git fetch --all --prune
    git checkout <release_branch>
    git pull --all
    cd build
    cmake .. -GNinja \
      -DPython3_EXECUTABLE=/path/to/venv/bin/python
    cmake --build . --parallel
    ctest
    cmake --build . --target webdoc
    cd ../..
    ln -si repo/hugo/public hugo-public
    cd ~/www/ba/public
    ln -si /home/www/ba/VERSION/hugo-public VERSION
    rm latest
    ln -si VERSION latest
    
  • Merge release branch to ba-www => Docs will automatically be updated

  • Inform users

    • Mail to BornAgain mailing list
    • For major milestones, mail to external mailing lists (neutron, sa_scat [unsigned mails only!])
    • Update “Latest” section on computing.mlz-garching.de

Continue development

  • Merge changes back into develop
    • fork new feature branch from develop
    • merge release branch
    • restore “git-develop” in hugo/hugo.toml
    • update version number in CMakeLists.txt
    • create MR against develop