|
| 1 | +# sambacc Release Process |
| 2 | + |
| 3 | +## Preparation |
| 4 | + |
| 5 | +Currently there is no dedicated branch for releases. sambacc is simple enough, |
| 6 | +has few dependencies, and we're not planning on doing backports. Therefore |
| 7 | +we apply release tags to the master branch. |
| 8 | + |
| 9 | +``` |
| 10 | +git checkout master |
| 11 | +git pull --ff-only |
| 12 | +git tag -a -m 'Release v0.3' v0.3 |
| 13 | +``` |
| 14 | + |
| 15 | +This creates an annotated tag. Release tags must be annotated tags. |
| 16 | + |
| 17 | +Perform a final check that all supported OSes build. You can |
| 18 | +follow the commands below, which are based on the github workflows at the |
| 19 | +time this document was written: |
| 20 | + |
| 21 | +``` |
| 22 | +podman build --build-arg=SAMBACC_BASE_IMAGE=quay.io/centos/centos:stream9 -t sambacc:temp-centos9 tests/container/ -f tests/container/Containerfile |
| 23 | +podman build --build-arg=SAMBACC_BASE_IMAGE=registry.fedoraproject.org/fedora:37 -t sambacc:temp-fc37 tests/container/ -f tests/container/Containerfile |
| 24 | +podman build --build-arg=SAMBACC_BASE_IMAGE=registry.fedoraproject.org/fedora:38 -t sambacc:temp-fc38 tests/container/ -f tests/container/Containerfile |
| 25 | +
|
| 26 | +# name the last part after the release version |
| 27 | +mybuild=$PWD/_builds/v03 |
| 28 | +mkdir -p $mybuild |
| 29 | +# perform a combined test & build, that stores build artifacts under $mybuild/$SAMBACC_DISTNAME |
| 30 | +podman run -v $PWD:/var/tmp/build/sambacc -v $mybuild:/srv/dist -e SAMBACC_DISTNAME=centos9 sambacc:temp-centos9 |
| 31 | +podman run -v $PWD:/var/tmp/build/sambacc -v $mybuild:/srv/dist -e SAMBACC_DISTNAME=fc37 sambacc:temp-fc37 |
| 32 | +podman run -v $PWD:/var/tmp/build/sambacc -v $mybuild:/srv/dist -e SAMBACC_DISTNAME=fc38 sambacc:temp-fc38 |
| 33 | +
|
| 34 | +# view build results |
| 35 | +ls -lR $mybuild |
| 36 | +``` |
| 37 | + |
| 38 | +Modify the set of base OSes to match what is supported by the release. Check |
| 39 | +that the logs show that tag version was correctly picked up by the build. |
| 40 | +The python and rpm packages should indicate the new release version and not |
| 41 | +include an "unreleased git version". |
| 42 | + |
| 43 | +For at least one build, select a set of files that includes the source tarball, |
| 44 | +the Python Wheel (.whl file), and a source RPM. Create or alter an existing |
| 45 | +sha512sums file containing the sha512 hashes of these files. |
| 46 | + |
| 47 | + |
| 48 | +## GitHub Release |
| 49 | + |
| 50 | +When you are satisfied that the tagged version is suitable for release, you |
| 51 | +can push the tag to the public repo: |
| 52 | +``` |
| 53 | +git push --follow-tags |
| 54 | +``` |
| 55 | + |
| 56 | +Manually trigger a COPR build. Confirm that new COPR build contains the correct |
| 57 | +version number and doesn't include an "unreleased git version". |
| 58 | +You will need to have a fedora account and the ability to trigger builds |
| 59 | +for `phlogistonjohn/sambacc`. |
| 60 | + |
| 61 | +Draft a new set of release notes. Select the recently pushed tag. Start with |
| 62 | +the auto-generated release notes from github (activate the `Generate release |
| 63 | +notes` button/link). Add an introductory section (see previous notes for an |
| 64 | +example). Add a "Highlights" section if there are any notable features or fixes |
| 65 | +in the release. The Highlights section can be skipped if the content of the |
| 66 | +release is unremarkable (e.g. few changes occurred since the previous release). |
| 67 | + |
| 68 | +Attach the source tarball, the Python Wheel, and one SRPM from the earlier |
| 69 | +build(s), along with the sha512sums file to the release. |
| 70 | + |
| 71 | +Perform a final round of reviews, as needed, for the release notes and then |
| 72 | +publish the release. |
| 73 | + |
| 74 | + |
| 75 | +## PyPI |
| 76 | + |
| 77 | +There is a sambacc repository on PyPI. This exists mainly to reserve the |
| 78 | +sambacc name, however we desire to keep it up to date too. |
| 79 | +You will need to have a PyPI account and access to the sambacc repo. |
| 80 | + |
| 81 | +Log into PyPI web UI. (Re)Generate a pypi login token for sambacc. |
| 82 | +Ensure `twine` is installed: |
| 83 | +``` |
| 84 | +python3 -m pip install --upgrade twine |
| 85 | +``` |
| 86 | + |
| 87 | +Create a directory to store the python build artifacts: |
| 88 | +``` |
| 89 | +rm -rf _build/pypi |
| 90 | +mkdir -p _build/pypi |
| 91 | +cp sambacc-0.3.tar.gz sambacc-0.3-py3-none-any.whl _build/pypi |
| 92 | +``` |
| 93 | +Upload the files to PyPI creating a new release: |
| 94 | +``` |
| 95 | +python3 -m twine upload _build/pypi/* |
| 96 | +# Supply a username of `__token__` and the password will be the value |
| 97 | +of the token you acquiried above. |
| 98 | +``` |
| 99 | + |
| 100 | +A new release like `https://pypi.org/project/sambacc/0.3/` should have become |
| 101 | +available. |
0 commit comments