Skip to content

Commit

Permalink
Update to use GHA CI for releasing
Browse files Browse the repository at this point in the history
Prep for 3.10.6 release
  • Loading branch information
robe2 committed Nov 12, 2023
1 parent 9b5e544 commit 7cb33c9
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 30 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#
# GitHub Actions for GEOS Web Pages
# Paul Ramsey <[email protected]>, Regina Obe <[email protected]>
#

#
# Only run on tag
# Only release if distcheck succeeds
# Only release of the tag name is identical to the full version
# Use the first block of NEWS entries as release notes
#

name: 'Release'

on:
push:
tags:
- '*.*.*'

jobs:
release:
name: 'Release on Tag'
runs-on: ubuntu-latest

# Only run docbuild on central repo
if: github.repository == 'libgeos/geos'
steps:

- name: 'Install'
run: |
pwd
uname -a
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make doxygen
- name: 'Check Out'
uses: actions/checkout@v3

- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1

- name: 'Read Version'
id: version
run: |
pwd
source Version.txt
GEOS_FULL_VERSION=${GEOS_VERSION_MAJOR}.${GEOS_VERSION_MINOR}.${GEOS_VERSION_PATCH}${GEOS_PATCH_WORD}
echo GEOS_FULL_VERSION $GEOS_FULL_VERSION
echo "::set-output name=geosversion::${GEOS_FULL_VERSION}"
- name: 'Create Release Notes'
id: notes
run: |
pwd
perl tools/ci/releasenotes.pl NEWS > release.md
echo "::set-output name=geosnotes::./release.md"
- name: 'Bundle & Check Package'
id: bundle
run: |
pwd
set -e
mkdir _build && cd _build
cmake -DBUILD_DOCUMENTATION=YES ..
cmake --version
cmake --build . --target distcheck
- name: Create Release
if: ${{ steps.tag.outputs.tag == steps.version.outputs.geosversion }}
id: create_release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ steps.notes.outputs.geosnotes }}
name: Release ${{ steps.version.outputs.geosversion }}
prerelease: false
files: |
./_build/geos*.tar.bz2
45 changes: 20 additions & 25 deletions HOWTO_RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- GEOS_VERSION_PATCH
- GEOS_VERSION_MINOR
- GEOS_VERSION_MAJOR
- GEOS_PATCH_WORD

- CAPI_INTERFACE_CURRENT
- CAPI_INTERFACE_REVISION
Expand All @@ -20,46 +21,40 @@
$ 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.
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.
Push changes with: git push origin,
and confirm all bots are green before moving forward

6. Build the distribution package.
6. Tag the release:

$ BRANCH_NAME=3.10
$ git clone --depth 1 --branch $BRANCH_NAME \
https://github.com/libgeos/geos.git geos-$BRANCH_NAME
$ cd geos-$BRANCH_NAME
$ mkdir _build && cd _build
$ cmake ..
$ cmake --build . --target dist
$ git tag MAJOR.MINOR.PATCH
$ git push origin MAJOR.MINOR.PATCH

7. Verify that you can un-pack and build the tarball.
7. At this point the github/release.yml action should run,
wait for it to finish and then verify you can build with it.

$ tar xvfz geos-VERSION.tar.bz2
$ cd geos-VERSION
$ 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 tarball to upload.osgeo.org:/osgeo/download/geos
8. Copy the tar.bz2 tarball to upload.osgeo.org:/osgeo/download/geos

9. Tag the release:

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

10. Create and push a release branch if this was a PATCH=0 release,
9. Create and push a release branch if this was a PATCH=0 release,
update the versions for next release in Version.txt (both in
main and release branch if this was a PATCH=0 release).
main and release branch).

11. Update web page Download section
10. Update download page in main branch: web/content/usage/download.md

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

12. Close current github milestone and add new one for next release

12. Announce on geos-devel
11. Close current GitHub milestone and add a new one for next release.

12. Announce on geos-devel
7 changes: 4 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Changes in 3.10.6
2023-xx-xx
## Changes in 3.10.6
2023-11-11

- Fixes/Improvements:
- LargestEmptyCircle: enhance boundary to allow any polygonal geometry (GH-859, Martin Davis)
Expand All @@ -9,8 +9,9 @@ Changes in 3.10.6
- Remove undefined behaviour in use of null PrecisionModel (GH-931, Jeff Walton)
- PreparedLineStringIntersects: Fix incorrect result with mixed-dim collection with points (GH-774, Dan Baston)
- Skip over testing empty distances for mixed collections (GH-979, Paul Ramsey)
- Do not hide illegal argument exception in HeuristicOverlay (GH-925, Sandro Santilli)

Changes in 3.10.5
## Changes in 3.10.5
2023-03-16

- Fixes/Improvements:
Expand Down
4 changes: 2 additions & 2 deletions Version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEOS_VERSION_MINOR=10
GEOS_VERSION_PATCH=6

# OPTIONS: "", "dev", "rc1" etc.
GEOS_PATCH_WORD=dev
GEOS_PATCH_WORD=

# GEOS CAPI Versions
#
Expand All @@ -16,7 +16,7 @@ GEOS_PATCH_WORD=dev
# ( THIS MUST BE CAREFULLY AVOIDED )
#
CAPI_INTERFACE_CURRENT=17
CAPI_INTERFACE_REVISION=3
CAPI_INTERFACE_REVISION=6
CAPI_INTERFACE_AGE=16

# JTS Port
Expand Down
11 changes: 11 additions & 0 deletions tools/ci/releasenotes.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
my $first = 0;
while(<>) {
if (/^##/ && !$first) {
$first = 1;
next;
}
if (/^##/ && $first) {
exit;
}
print;
}

0 comments on commit 7cb33c9

Please sign in to comment.