mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-05-04 14:25:30 +08:00
ci: Change event from published to released
This commit is contained in:
parent
6a16840a86
commit
5d8b0b2005
26
.github/workflows/update-major-tag.yml
vendored
26
.github/workflows/update-major-tag.yml
vendored
@ -2,22 +2,20 @@ name: Update major tag
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [released]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
update:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
- uses: actions/checkout@v2.3.4
|
- name: Update major tag
|
||||||
|
run: |
|
||||||
- name: Update major tag
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
if: github.event.release.prerelease == false
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
run: |
|
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
||||||
git config user.name "${GITHUB_ACTOR}"
|
export TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
export TAG_MAJOR="${TAG_NAME%%.*}"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
git tag --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}"
|
||||||
export TAG_NAME="${GITHUB_REF##refs/tags/}"
|
git push --force origin "${TAG_MAJOR}"
|
||||||
export TAG_MAJOR="${TAG_NAME%%.*}"
|
|
||||||
git tag --force -a "${TAG_MAJOR}" -m "Release ${TAG_NAME}"
|
|
||||||
git push --force origin "${TAG_MAJOR}"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user