-
Notifications
You must be signed in to change notification settings - Fork 34
79 lines (67 loc) · 2.04 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# GitHub Actions for automated PROJ-data release
#
# Only run on tags matching x.y.z or x.y.zRCn
#
# Automatically opens a draft release and uploads the packages build with CMake
# as well as various checksum files. Manual steps includes adding release notes
# and changes the release status from draft to final. Release candidates are
# automatically set a pre-releases.
name: 'Release'
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+RC[0-9]+'
jobs:
release:
name: 'Release on Tag'
runs-on: ubuntu-latest
# Only run docbuild on central repo
if: github.repository == 'OSGeo/PROJ-data'
steps:
- name: 'Install'
run: |
pwd
uname -a
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake
- name: 'Check Out'
uses: actions/checkout@v4
- name: 'Final release?'
id: release_type
run: |
echo "final_release=false" >> $GITHUB_OUTPUT
echo tag=${{github.ref_name}}
if [[ ${{ github.ref_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "final_release=true" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
- name: 'Bundle & Check Package'
id: bundle
run: |
pwd
set -e
mkdir _build && cd _build
cmake --version
cmake ..
cmake --build . --target dist
extensions=".tar.gz .zip"
for ext in $extensions
do
for filename in $(ls *$ext)
do
`md5sum $filename > $filename.md5`
`sha256sum $filename > $filename.sha256sum`
`sha512sum $filename > $filename.sha512sum`
done
done
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: false
draft: true
name: PROJ-data ${{ github.ref_name }}
prerelease: ${{ steps.release_type.outputs.final_release == 'false' }}
files: |
./_build/proj-data-*