Skip to content

Commit

Permalink
ci: fix issue in tag detection
Browse files Browse the repository at this point in the history
  • Loading branch information
svenrademakers committed Nov 4, 2024
1 parent cf792a2 commit b8c432e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
Expand All @@ -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 }}
Expand Down
File renamed without changes.

0 comments on commit b8c432e

Please sign in to comment.