File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update major tag
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ update :
9+ runs-on : ubuntu-18.04
10+ steps :
11+
12+ - uses : actions/checkout@v2
13+
14+ - name : Update major tag
15+ if : github.event.release.prerelease == false
16+ run : |
17+ git config user.name "${GITHUB_ACTOR}"
18+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
19+ git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
20+ export TAG_NAME="${GITHUB_REF##refs/tags/}"
21+ export TAG_MAJOR="${TAG_NAME%%.*}"
22+ git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || git tag -d "${TAG_MAJOR}" ; git push --delete origin "${TAG_MAJOR}"
23+ git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true
24+ git push origin "${TAG_MAJOR}"
You can’t perform that action at this time.
0 commit comments