Updated OpenSSH tag check

This commit is contained in:
takeshix 2021-04-19 16:26:10 +02:00
parent 349f0d7f3e
commit c0f10cbaa1

View file

@ -111,12 +111,13 @@ jobs:
id: tag_release id: tag_release
run: | run: |
set +e set +e
if [ $(git tag "openssh-v${{ needs.build-x86.outputs.version }}") ];then if git rev-list "openssh-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then
echo "Tag for openssh-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
else
git tag "openssh-v${{ needs.build-x86.outputs.version }}"
git push origin "openssh-v${{ needs.build-x86.outputs.version }}" git push origin "openssh-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true" 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 fi
- name: Create Release - name: Create Release