2019-12-08 06:45:59 +00:00
|
|
|
name: Update major tag
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Update major tag
|
|
|
|
if: github.event.release.prerelease == false
|
|
|
|
run: |
|
|
|
|
git config user.name "${GITHUB_ACTOR}"
|
|
|
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
|
|
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
|
|
|
export TAG_NAME="${GITHUB_REF##refs/tags/}"
|
|
|
|
export TAG_MAJOR="${TAG_NAME%%.*}"
|
2019-12-10 04:50:09 +00:00
|
|
|
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || git tag -d "${TAG_MAJOR}" ; git push origin ":refs/tags/${TAG_MAJOR}"
|
|
|
|
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true
|
2019-12-08 06:45:59 +00:00
|
|
|
git push --tags origin
|