Skip to content

Commit

Permalink
Create action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Sep 28, 2020
1 parent 0330fcf commit 3e63aba
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions update-major-tag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Update major tag'
description: 'Update major tag like v1'
inputs:
placeholder:
description: 'placeholder'
default: ''
required: false
runs:
using: "composite"
steps:
- 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:${{ 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}"
shell: bash

0 comments on commit 3e63aba

Please sign in to comment.