Skip to content

Publishing

Ben Knoll edited this page Oct 3, 2024 · 19 revisions

Prior to tag

Create release branch.

export VERSION=v1.y.z
git checkout -b release/${VERSION:?}
cd go
go generate doc.go

Then commit, create and merge PR, and switch back to main.

git commit -a -m "Release ${VERSION#v}"
git push origin release/${VERSION:?}
gh pr create
git checkout main
git pull

Tagging

Tag the commit on main with the release tag and then push tag to upstream remote.

git tag -a -s ${VERSION:?} -m "Release Message"
git push origin ${VERSION:?}

Publishing Python to PyPI

pip install build twine
rm -r build dist
python -m build -sw
twine check dist/*
twine upload dist/*

Publishing Java to Maven Central

Make sure you have gpg installed for signing and the following $HOME/.gradle/gradle.properties variables:

signing.gnupg.keyName=

sonatypeUsername=
sonatypePassword=

Then:

cd java
./gradlew clean build publish

Go to https://oss.sonatype.org/ and close then release the staging repository.

GitHub Release

Create the GitHub Releases entry summarizing changes and incompatibilities.

Change the name of the "Next Release" milestone to the released version and create a new "Next Release" milestone.

Clone this wiki locally