Skip to content

Commit

Permalink
ci: Change trigger from published to released
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Jun 18, 2021
1 parent 3c6482d commit 1750a41
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/update-major-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ name: Update major tag

on:
release:
types: [published]
types: [released]

jobs:
update:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v2.3.4

- uses: actions/checkout@v2.3.4

- 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%%.*}"
git tag --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}"
git push --force origin "${TAG_MAJOR}"
- name: Update major tag
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%%.*}"
git tag --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}"
git push --force origin "${TAG_MAJOR}"

0 comments on commit 1750a41

Please sign in to comment.