File tree Expand file tree Collapse file tree 3 files changed +29
-24
lines changed
Expand file tree Collapse file tree 3 files changed +29
-24
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5- head_tag=$( git describe --exact-match 2> /dev/null | true)
5+ head_tag=$( git describe --exact-match 2> /dev/null || true)
66
7- if [[ ${head_tag} =~ [\d {2}.\d {2}.\d +] ]]
7+ git log --color=always --format=" %C(auto)%h %s%d" | head
8+
9+ if [[ ${head_tag} =~ [\d {2}\.\d {2}\.\d +] ]]
810then
911 echo " Current master already has version tag ${head_tag} "
1012else
1315 version=$( date +' %y.%m.0' )
1416 git tag -a ${version} -m " Release ${version} "
1517 git push origin ${version}
18+ git log --color=always --format=" %C(auto)%h %s%d" | head -1
1619 echo " Pushed new tag:"
17- echo " ${{github.server_url} }/ ${{github.repository} } /tag/${version} "
20+ echo " ${REPO_URL} /releases /tag/${version} "
1821fi
Original file line number Diff line number Diff line change 1212 steps :
1313
1414 - name : Checkout
15- uses : actions/checkout@v2
15+ uses : actions/checkout@v3
1616 with :
1717 fetch-depth : 0
1818
Original file line number Diff line number Diff line change 1- name : Tag
2-
3- on :
4- schedule :
5- # Run on every first day of the month
6- - cron : ' 0 0 1 * *'
7-
8- jobs :
9-
10- tag :
11- runs-on : ubuntu-latest
12- steps :
13-
14- - name : Checkout
15- uses : actions/checkout@v2
16- with :
17- fetch-depth : 0
18-
19- - name : Create Tag
20- run : .github/scripts/tag.sh
1+ name : Tag
2+
3+ on :
4+ schedule :
5+ # Run on every first day of the month
6+ - cron : ' 0 0 1 * *'
7+
8+ jobs :
9+
10+ tag :
11+ runs-on : ubuntu-latest
12+ steps :
13+
14+ - name : Checkout
15+ uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Create Tag
20+ run : .github/scripts/tag.sh
21+ env :
22+ REPO_URL : ${{github.server_url}}/${{github.repository}}
You can’t perform that action at this time.
0 commit comments