This document outlines the process for releasing versions of the form $MAJOR.$MINOR.$PATCH.
We distinguish between two types of releases: regular and maintenance releases. Regular releases are releases of a new major or minor version as well as patches of the most recent release. Maintenance releases, on the other hand, are required for patches of older releases.
You should coordinate with the other maintainers on the release date, if possible. This date will be part of the release entry in CHANGELOG.md and it should match the dates of the remaining steps in the release process (including the date of the tag and the GitHub release). It is best if the maintainers are present during the release, so they can help ensure that the process is followed correctly and, in the case of a regular release, they are aware that they should not modify the master branch between merging the PR in step 1 and the PR in step 3.
This process also assumes that there will be no minor releases for old major releases.
We aim to cut a regular release every 3-4 months, approximately twice as frequent as major Bitcoin Core releases. Every second release should be published one month before the feature freeze of the next major Bitcoin Core release, allowing sufficient time to update the library in Core.
Perform these checks when reviewing the release PR (see below):
make distcheck doesn't fail. `shell
./autogen.sh && ./configure --enable-dev-mode && make distcheck
`
`shell
dir=$(mktemp -d)
./autogen.sh && ./configure --prefix=$dir && make clean && make install && ls -RlAh $dir
gcc -o ecdsa examples/ecdsa.c $(PKGCONFIGPATH=$dir/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"$dir/lib" && ./ecdsa
`
`shell
dir=$(mktemp -d)
build=$(mktemp -d)
cmake -B $build -DCMAKEINSTALLPREFIX=$dir && cmake --build $build && cmake --install $build && ls -RlAh $dir
gcc -o ecdsa examples/ecdsa.c -I $dir/include -L $dir/lib*/ -l secp256k1 -Wl,-rpath,"$dir/lib",-rpath,"$dir/lib64" && ./ecdsa
`
abi-dumper and abi-compliance-checker packages are required. `shell
tools/check-abi.sh
`
"release: prepare for $MAJOR.$MINOR.$PATCH", for example) that * finalizes the release notes in CHANGELOG.md by
* adding a section for the release (make sure that the version number is a link to a diff between the previous and new version),
* removing the [Unreleased] section header,
* ensuring that the release notes are not missing entries (check the needs-changelog label on github), and
* including an entry for ### ABI Compatibility if it doesn't exist,
* sets _PKG_VERSION_IS_RELEASE to true in configure.ac, and,
* if this is not a patch release,
updates `_PKG_VERSION_ and LIBVERSION_* in configure.ac`, and
updates `project(libsecp256k1 VERSION ...)` and `${PROJECT_NAME}_LIB_VERSION_ in CMakeLists.txt`.
`
RELEASE_COMMIT=<merge commit of step 1>
git tag -s v$MAJOR.$MINOR.$PATCH -m "libsecp256k1 $MAJOR.$MINOR.$PATCH" $RELEASE_COMMIT
git push git@github.com:bitcoin-core/secp256k1.git v$MAJOR.$MINOR.$PATCH
`
"release cleanup: bump version after $MAJOR.$MINOR.$PATCH", for example) that * sets _PKG_VERSION_IS_RELEASE to false and increments _PKG_VERSION_PATCH and _LIB_VERSION_REVISION in configure.ac,
* increments the $PATCH component of project(libsecp256k1 VERSION ...) and ${PROJECT_NAME}_LIB_VERSION_REVISION in CMakeLists.txt, and
* adds an [Unreleased] section header and a corresponding [Unreleased] link at the bottom of CHANGELOG.md.
If other maintainers are not present to approve the PR, it can be merged without ACKs.
Note that bug fixes need to be backported only to releases for which no compatible release without the bug exists.
$MAJOR.$MINOR, create one: `
git checkout -b $MAJOR.$MINOR v$MAJOR.$MINOR.$((PATCH - 1))
git push git@github.com:bitcoin-core/secp256k1.git $MAJOR.$MINOR
`
$MAJOR.$MINOR branch that * includes the bug fixes,
* finalizes the release notes similar to a regular release,
* increments _PKG_VERSION_PATCH and _LIB_VERSION_REVISION in configure.ac
and the $PATCH component of project(libsecp256k1 VERSION ...) and ${PROJECT_NAME}_LIB_VERSION_REVISION in CMakeLists.txt
(with commit message "release: bump versions for $MAJOR.$MINOR.$PATCH", for example).
`
git checkout $MAJOR.$MINOR && git pull
git tag -s v$MAJOR.$MINOR.$PATCH -m "libsecp256k1 $MAJOR.$MINOR.$PATCH"
git push git@github.com:bitcoin-core/secp256k1.git v$MAJOR.$MINOR.$PATCH
`
"release notes: add $MAJOR.$MINOR.$PATCH", for example) that adds release notes to CHANGELOG.md.