@@ -26,21 +26,22 @@ jobs:
2626
2727 steps :
2828 # Prepare
29- - uses : actions/checkout@v2
29+ - name : Checkout repository
30+ uses : actions/checkout@v3
31+
32+ - name : Set up Node.js
33+ uses : actions/setup-node@v3
34+ with :
35+ node-version : 16
3036
3137 - name : Setup git credentials
3238 run : |
3339 git config user.name 'Vadzim Hushchanskou'
3440 git config user.email 'vadzim.hushchanskou@gmail.com'
3541 git config user.password ${{ secrets.GITHUB_TOKEN }}
3642
37- - name : Set up Node.js
38- uses : actions/setup-node@v1
39- with :
40- node-version : 12.x
41-
4243 - name : Generate versions
43- uses : HardNorth/github-version-generate@v1.1.2
44+ uses : HardNorth/github-version-generate@v1.2.0
4445 with :
4546 version-source : file
4647 version-file : ${{ env.VERSION_FILE }}
9192 - name : Tagging new version
9293 id : newVersionTag
9394 run : |
94- git tag -a v${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
95+ RELEASE_TAG="v${{ env.RELEASE_VERSION }}"
96+ MINOR_TAG="v${{ env.RELEASE_VERSION_MAJOR }}.${{ env.RELEASE_VERSION_MINOR }}"
97+ MAJOR_TAG="v${{ env.RELEASE_VERSION_MAJOR }}"
98+
99+ git tag -d "${MINOR_TAG}" || true
100+ git tag -d "${MAJOR_TAG}" || true
101+ git push origin ":${MINOR_TAG}" || true
102+ git push origin ":${MAJOR_TAG}" || true
103+
104+ git tag -a "${RELEASE_TAG}" -m "Release ${{ env.RELEASE_VERSION }}"
105+ git tag -a "${MINOR_TAG}" -m "Tag latest minor version"
106+ git tag -a "${MAJOR_TAG}" -m "Tag latest major version"
95107 git push --tags
96108
97109 - name : Read changelog Entry
@@ -115,7 +127,7 @@ jobs:
115127
116128 - name : Checkout develop branch
117129 if : ${{github.ref}} == 'main'
118- uses : actions/checkout@v2
130+ uses : actions/checkout@v3
119131 with :
120132 ref : ' develop'
121133 fetch-depth : 0
0 commit comments