Skip to content

Commit 7cb33c9

Browse files
committed
Update to use GHA CI for releasing
Prep for 3.10.6 release
1 parent 9b5e544 commit 7cb33c9

File tree

5 files changed

+114
-30
lines changed

5 files changed

+114
-30
lines changed

.github/workflows/release.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#
2+
# GitHub Actions for GEOS Web Pages
3+
# Paul Ramsey <[email protected]>, Regina Obe <[email protected]>
4+
#
5+
6+
#
7+
# Only run on tag
8+
# Only release if distcheck succeeds
9+
# Only release of the tag name is identical to the full version
10+
# Use the first block of NEWS entries as release notes
11+
#
12+
13+
name: 'Release'
14+
15+
on:
16+
push:
17+
tags:
18+
- '*.*.*'
19+
20+
jobs:
21+
release:
22+
name: 'Release on Tag'
23+
runs-on: ubuntu-latest
24+
25+
# Only run docbuild on central repo
26+
if: github.repository == 'libgeos/geos'
27+
steps:
28+
29+
- name: 'Install'
30+
run: |
31+
pwd
32+
uname -a
33+
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install make doxygen
34+
35+
- name: 'Check Out'
36+
uses: actions/checkout@v3
37+
38+
- name: Get tag
39+
id: tag
40+
uses: dawidd6/action-get-tag@v1
41+
42+
- name: 'Read Version'
43+
id: version
44+
run: |
45+
pwd
46+
source Version.txt
47+
GEOS_FULL_VERSION=${GEOS_VERSION_MAJOR}.${GEOS_VERSION_MINOR}.${GEOS_VERSION_PATCH}${GEOS_PATCH_WORD}
48+
echo GEOS_FULL_VERSION $GEOS_FULL_VERSION
49+
echo "::set-output name=geosversion::${GEOS_FULL_VERSION}"
50+
51+
- name: 'Create Release Notes'
52+
id: notes
53+
run: |
54+
pwd
55+
perl tools/ci/releasenotes.pl NEWS > release.md
56+
echo "::set-output name=geosnotes::./release.md"
57+
58+
- name: 'Bundle & Check Package'
59+
id: bundle
60+
run: |
61+
pwd
62+
set -e
63+
mkdir _build && cd _build
64+
cmake -DBUILD_DOCUMENTATION=YES ..
65+
cmake --version
66+
cmake --build . --target distcheck
67+
68+
- name: Create Release
69+
if: ${{ steps.tag.outputs.tag == steps.version.outputs.geosversion }}
70+
id: create_release
71+
uses: softprops/action-gh-release@v1
72+
with:
73+
body_path: ${{ steps.notes.outputs.geosnotes }}
74+
name: Release ${{ steps.version.outputs.geosversion }}
75+
prerelease: false
76+
files: |
77+
./_build/geos*.tar.bz2

HOWTO_RELEASE

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- GEOS_VERSION_PATCH
55
- GEOS_VERSION_MINOR
66
- GEOS_VERSION_MAJOR
7+
- GEOS_PATCH_WORD
78

89
- CAPI_INTERFACE_CURRENT
910
- CAPI_INTERFACE_REVISION
@@ -20,46 +21,40 @@
2021
$ ctest --output-on-failure .
2122
$ cmake --build . --target distcheck
2223

23-
4. Update the NEWS file (extract most important things from the
24-
repository log). Make sure to update the release date.
24+
4. Update the NEWS file (extract most important things from the repository log).
25+
Make sure to update the release date.
2526

2627
5. Commit the changes in the NEWS file.
28+
Push changes with: git push origin,
29+
and confirm all bots are green before moving forward
2730

28-
6. Build the distribution package.
31+
6. Tag the release:
2932

30-
$ BRANCH_NAME=3.10
31-
$ git clone --depth 1 --branch $BRANCH_NAME \
32-
https://github.com/libgeos/geos.git geos-$BRANCH_NAME
33-
$ cd geos-$BRANCH_NAME
34-
$ mkdir _build && cd _build
35-
$ cmake ..
36-
$ cmake --build . --target dist
33+
$ git tag MAJOR.MINOR.PATCH
34+
$ git push origin MAJOR.MINOR.PATCH
3735

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

40-
$ tar xvfz geos-VERSION.tar.bz2
41-
$ cd geos-VERSION
39+
$ VERSION=MAJOR.MINOR.PATCH
40+
$ wget https://github.com/libgeos/geos/releases/download/$VERSION/geos-$VERSION.tar.bz2
41+
$ tar xvfz geos-$VERSION.tar.bz2
42+
$ cd geos-$VERSION
4243
$ mkdir _build && cd _build && cmake ..
4344
$ cmake --build .
4445
$ ctest --output-on-failure .
4546

46-
8. Copy the tarball to upload.osgeo.org:/osgeo/download/geos
47+
8. Copy the tar.bz2 tarball to upload.osgeo.org:/osgeo/download/geos
4748

48-
9. Tag the release:
49-
50-
$ git tag MAJOR.MINOR.PATCH
51-
$ git push origin MAJOR.MINOR.PATCH
52-
53-
10. Create and push a release branch if this was a PATCH=0 release,
49+
9. Create and push a release branch if this was a PATCH=0 release,
5450
update the versions for next release in Version.txt (both in
55-
main and release branch if this was a PATCH=0 release).
51+
main and release branch).
5652

57-
11. Update web page Download section
53+
10. Update download page in main branch: web/content/usage/download.md
5854

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

62-
12. Close current github milestone and add new one for next release
63-
64-
12. Announce on geos-devel
58+
11. Close current GitHub milestone and add a new one for next release.
6559

60+
12. Announce on geos-devel

NEWS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Changes in 3.10.6
2-
2023-xx-xx
1+
## Changes in 3.10.6
2+
2023-11-11
33

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

13-
Changes in 3.10.5
14+
## Changes in 3.10.5
1415
2023-03-16
1516

1617
- Fixes/Improvements:

Version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ GEOS_VERSION_MINOR=10
55
GEOS_VERSION_PATCH=6
66

77
# OPTIONS: "", "dev", "rc1" etc.
8-
GEOS_PATCH_WORD=dev
8+
GEOS_PATCH_WORD=
99

1010
# GEOS CAPI Versions
1111
#
@@ -16,7 +16,7 @@ GEOS_PATCH_WORD=dev
1616
# ( THIS MUST BE CAREFULLY AVOIDED )
1717
#
1818
CAPI_INTERFACE_CURRENT=17
19-
CAPI_INTERFACE_REVISION=3
19+
CAPI_INTERFACE_REVISION=6
2020
CAPI_INTERFACE_AGE=16
2121

2222
# JTS Port

tools/ci/releasenotes.pl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
my $first = 0;
2+
while(<>) {
3+
if (/^##/ && !$first) {
4+
$first = 1;
5+
next;
6+
}
7+
if (/^##/ && $first) {
8+
exit;
9+
}
10+
print;
11+
}

0 commit comments

Comments
 (0)