parent
c42917a4dc
commit
e9786c6d30
|
@ -24,21 +24,19 @@ jobs:
|
|||
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Fetch tags
|
||||
if: ${{ env.full == 'true' && env.upload == 'release' }}
|
||||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
|
||||
- name: Check if tag exists
|
||||
if: ${{ env.full == 'true' && env.upload == 'release' }}
|
||||
run: git show-ref --tags --verify --quiet -- "refs/tags/${{ env.date }}" && echo "tagged=true" >> $GITHUB_ENV || echo "tagged=false" >> $GITHUB_ENV
|
||||
- uses: mukunku/tag-exists-action@v1.2.0
|
||||
id: checkTag
|
||||
with:
|
||||
tag: ${{ env.date }}
|
||||
|
||||
- name: Create Release Tag
|
||||
if: ${{ env.full == 'true' && env.upload == 'release' && env.tagged == 'false' }}
|
||||
if: ${{ env.full == 'true' && env.upload == 'release' && steps.checkTag.outputs.exists == 'false' }}
|
||||
id: tag
|
||||
uses: mathieudutour/github-tag-action@v6.1
|
||||
with:
|
||||
github_token: ${{ secrets.ACCESS_TOKEN }}
|
||||
custom_tag: ${{ env.date }}
|
||||
tag_prefix: ''
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ env.full == 'true' && env.upload == 'release' }}
|
||||
|
|
Loading…
Reference in New Issue