11name : Release
22
33on :
4- push :
5- tags :
6- - ' v*.*.*'
7-
4+ workflow_dispatch :
85
96permissions :
107 contents : read
2522 with :
2623 fetch-depth : 0
2724
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+
2830 - name : Get postgres version
2931 run : |
3032 sudo service postgresql start
@@ -34,17 +36,14 @@ jobs:
3436 echo "PGPORT=5432" >> $GITHUB_ENV
3537 echo "PGIS=3" >> $GITHUB_ENV
3638 echo "PGROUTING_VERSION=${PGROUTING_VERSION}" >> $GITHUB_ENV
39+ echo "TAG_NAME=v${PGROUTING_VERSION}" >> $GITHUB_ENV
3740
38- - name : Verify Tag Name
41+ - name : Create and Push Tag
3942 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 }}
4847
4948 - name : Extract branch name and commit hash
5049 run : |
8887 mkdir build
8988 cd build
9089 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 ..
9291
9392 - name : Build
9493 run : |
9897 sudo make install
9998 make doxy
10099
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-
106100 - name : Update Users Documentation
107101 run : |
108102 git checkout origin/gh-pages
0 commit comments