Skip to content

Merge pull request #16 from Rasic2/dev/zhouh #114

Merge pull request #16 from Rasic2/dev/zhouh

Merge pull request #16 from Rasic2/dev/zhouh #114

Workflow file for this run

name: AddTag
on: push
jobs:
add_tag:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: List Tags
run: |
date_now=$(date +"%Y.%m.%d")
new_tag=$(echo -e "v${date_now}")
git fetch origin --tags # obtain the tags from remote
exist=$(git tag | grep ${new_tag} | wc -l)
if [ ${exist} -eq 1 ];then
git tag -d ${new_tag} # delete tag local
git push origin :refs/tags/${new_tag} # delete tag remote
fi
git tag ${new_tag}
git push origin --tags