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