Skip to content

Commit 120644c

Browse files
Copilotchrisw-dev
andcommitted
Address code review feedback: make release creation conditional
Co-authored-by: chrisw-dev <[email protected]>
1 parent 5d4610c commit 120644c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
git config user.name "github-actions[bot]"
9191
git config user.email "github-actions[bot]@users.noreply.github.com"
9292
93-
# Check if tag already exists locally or remotely
94-
if git rev-parse "${{ steps.next_version.outputs.version }}" >/dev/null 2>&1; then
93+
# Check if tag already exists locally
94+
if git tag -l "${{ steps.next_version.outputs.version }}" | grep -q .; then
9595
echo "Tag ${{ steps.next_version.outputs.version }} already exists locally"
9696
echo "tag_created=false" >> $GITHUB_OUTPUT
9797
exit 0
@@ -111,6 +111,7 @@ jobs:
111111
echo "tag_created=true" >> $GITHUB_OUTPUT
112112
113113
- name: Create GitHub Release
114+
if: steps.create_tag.outputs.tag_created == 'true'
114115
uses: softprops/action-gh-release@v2
115116
with:
116117
tag_name: ${{ steps.next_version.outputs.version }}

0 commit comments

Comments
 (0)