-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Change event from published to released
- Loading branch information
Showing
1 changed file
with
12 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,20 @@ name: Update major tag | |
|
||
on: | ||
release: | ||
types: [published] | ||
types: [released] | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: actions/[email protected] | ||
|
||
- 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}" |