From b8c432edd06d1048aa9e38a1e35c8aaafa790fe8 Mon Sep 17 00:00:00 2001 From: Sven Rademakers Date: Mon, 4 Nov 2024 11:44:58 +0000 Subject: [PATCH] ci: fix issue in tag detection --- .github/workflows/release.yml | 8 +++++--- .github/workflows/{build.yml => validation.yml} | 0 2 files changed, 5 insertions(+), 3 deletions(-) rename .github/workflows/{build.yml => validation.yml} (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e30d135..11e8020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,16 +137,16 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Check if tag exists - id: check_tag run: | if git rev-parse --verify v${VERSION} >/dev/null 2>&1; then echo "TAG_EXISTS=true" >> $GITHUB_ENV - else echo "no new version detected, aborting release Pipeline" - exit 0 + else + echo "TAG_EXISTS=false" >> $GITHUB_ENV fi - name: Create new tag + if: ${{ env.TAG_EXISTS == 'false' }} run: | git config --global user.name "${{ github.actor }}" git config --global user.email "noreply@turingpi.com" @@ -156,12 +156,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download artifacts + if: ${{ env.TAG_EXISTS == 'false' }} uses: actions/download-artifact@v4 with: path: artifacts merge-multiple: true - name: Release + if: ${{ env.TAG_EXISTS == 'false' }} uses: ncipollo/release-action@v1 with: name: tpi v${{ env.VERSION }} diff --git a/.github/workflows/build.yml b/.github/workflows/validation.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/validation.yml