From c0f10cbaa1744109a32b853f7916cad6d2d0bfd1 Mon Sep 17 00:00:00 2001 From: takeshix Date: Mon, 19 Apr 2021 16:26:10 +0200 Subject: [PATCH] Updated OpenSSH tag check --- .github/workflows/build-openssh.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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