Added tag check to tcpdump workflow
This commit is contained in:
parent
75fdf2b4bc
commit
b613a7377c
1 changed files with 9 additions and 2 deletions
11
.github/workflows/build-tcpdump.yml
vendored
11
.github/workflows/build-tcpdump.yml
vendored
|
@ -109,11 +109,18 @@ jobs:
|
||||||
|
|
||||||
- name: Tag Release
|
- name: Tag Release
|
||||||
run: |
|
run: |
|
||||||
git tag "tcpdump-v${{ needs.build-x86.outputs.version }}"
|
set +e
|
||||||
git push origin "tcpdump-v${{ needs.build-x86.outputs.version }}"
|
if [ $(git tag "tcpdump-v${{ needs.build-x86.outputs.version }}") ];then
|
||||||
|
git push origin "tcpdump-v${{ needs.build-x86.outputs.version }}"
|
||||||
|
echo ::set-output name=NEW_RELEASE::"true"
|
||||||
|
else
|
||||||
|
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
|
||||||
|
echo ::set-output name=NEW_RELEASE::"false"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
|
if: ${{ steps.tag_release.outputs.NEW_RELEASE == 'true' }}
|
||||||
with:
|
with:
|
||||||
name: tcpdump-v${{ needs.build-x86.outputs.version }}
|
name: tcpdump-v${{ needs.build-x86.outputs.version }}
|
||||||
tag: tcpdump-v${{ needs.build-x86.outputs.version }}
|
tag: tcpdump-v${{ needs.build-x86.outputs.version }}
|
||||||
|
|
Loading…
Reference in a new issue