1. Verify that the versions currently set in Version.txt
   make sense for this release. See file for instructions.

    - GEOS_VERSION_PATCH
    - GEOS_VERSION_MINOR
    - GEOS_VERSION_MAJOR
    - GEOS_PATCH_WORD

    - CAPI_INTERFACE_CURRENT
    - CAPI_INTERFACE_REVISION
    - CAPI_INTERFACE_AGE

2. Prepare the build directory.

   $ mkdir _build && cd _build && cmake -DBUILD_DOCUMENTATION=YES ..

3. Run the build, distcheck, docs targets, fix any problems with them.

   $ cmake --build .
   $ cmake --build . --target docs
   $ ctest --output-on-failure .
   $ cmake --build . --target distcheck

4. Update the NEWS file (extract most important things from the repository log).
   Make sure to update the release date.

5. Commit the changes in the NEWS file.

6. Tag the release:

   $ git tag MAJOR.MINOR.PATCH
   $ git push origin MAJOR.MINOR.PATCH

7. At this point the github/release.yml action should run, wait for it to finish.
   Verify that you can use the released tarball, replacing MAJOR.MINOR.PATCH with the tagged version variables

   $ VERSION=MAJOR.MINOR.PATCH
   $ wget https://github.com/libgeos/geos/releases/download/$VERSION/geos-$VERSION.tar.bz2
   $ tar xvfz geos-$VERSION.tar.bz2
   $ cd geos-$VERSION
   $ mkdir _build && cd _build && cmake ..
   $ cmake --build .
   $ ctest --output-on-failure .

8. Copy the tar.bz2 file to upload.osgeo.org:/osgeo/download/geos

9. If this a PATCH=0 release.

   - Create a new stable branch.
   - Update the versions for next release in Version.txt for both
     the main and stable branch.
      - In stable branch, bump the CAPI_INTERFACE_REVISION to 1
      - In main branch, bump CAPI_INTERFACE_CURRENT and CAPI_INTERFACE_AGE
        and set CAPI_INTERFACE_REVISION to 0
   - Remove the web/ directory from the stable branch, the web site
     is only built from the main branch.

10. Update download page of main branch: web/content/usage/download.md

    - Add latest release
    - Remove previous patch level release (if any)

11. If this is the latest stable tag release, update the: web/config.toml

    - Change the current_release variable to this tag release
 
12. Close current GitHub milestone and add a new one for next release.

13. Announce on geos-devel

