1
1
name : Release
2
2
3
3
on :
4
- push :
5
- tags :
6
- - ' v*.*.*'
7
-
4
+ workflow_dispatch :
8
5
9
6
permissions :
10
7
contents : read
25
22
with :
26
23
fetch-depth : 0
27
24
25
+ - name : Initialize mandatory git config
26
+ run : |
27
+ git config user.name "github-actions[bot]"
28
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
29
+
28
30
- name : Get postgres version
29
31
run : |
30
32
sudo service postgresql start
@@ -34,17 +36,14 @@ jobs:
34
36
echo "PGPORT=5432" >> $GITHUB_ENV
35
37
echo "PGIS=3" >> $GITHUB_ENV
36
38
echo "PGROUTING_VERSION=${PGROUTING_VERSION}" >> $GITHUB_ENV
39
+ echo "TAG_NAME=v${PGROUTING_VERSION}" >> $GITHUB_ENV
37
40
38
- - name : Verify Tag Name
41
+ - name : Create and Push Tag
39
42
run : |
40
- TAG_NAME=${GITHUB_REF#refs/*/}
41
- echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
42
- echo ${TAG_NAME}
43
- echo ${PGROUTING_VERSION}
44
- if [ "${TAG_NAME}" != "v${PGROUTING_VERSION}" ]; then
45
- echo "Tag name should be v${PGROUTING_VERSION}"
46
- exit 1
47
- fi
43
+ git tag -a "${TAG_NAME}" -m "Release version ${TAG_NAME}"
44
+ git push origin "${TAG_NAME}"
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
47
49
48
- name : Extract branch name and commit hash
50
49
run : |
88
87
mkdir build
89
88
cd build
90
89
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release \
91
- -DES=ON -DZH_HANS=ON..
90
+ -DES=ON -DZH_HANS=ON ..
92
91
93
92
- name : Build
94
93
run : |
98
97
sudo make install
99
98
make doxy
100
99
101
- - name : Initialize mandatory git config
102
- run : |
103
- git config user.name "github-actions[bot]"
104
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
105
-
106
100
- name : Update Users Documentation
107
101
run : |
108
102
git checkout origin/gh-pages
0 commit comments