diff --git a/.github/workflows/build-openssh.yml b/.github/workflows/build-openssh.yml index 4a120e8..cea4e49 100644 --- a/.github/workflows/build-openssh.yml +++ b/.github/workflows/build-openssh.yml @@ -111,12 +111,13 @@ jobs: id: tag_release run: | 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 }}" 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