Skip to content

Commit fdc4bb8

Browse files
Copilotseandavi
andcommitted
Add check to prevent duplicate release creation
Co-authored-by: seandavi <92435+seandavi@users.noreply.github.com>
1 parent fc67978 commit fdc4bb8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/monthly-release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
RELEASE_DATE: ${{ steps.date.outputs.date }}
2727
run: |
28-
gh release create "${RELEASE_DATE}" \
29-
--title "${RELEASE_DATE}" \
30-
--notes "Monthly release for ${RELEASE_DATE}. This release was automatically created by GitHub Actions."
28+
# Check if release already exists
29+
if gh release view "${RELEASE_DATE}" >/dev/null 2>&1; then
30+
echo "Release ${RELEASE_DATE} already exists, skipping creation"
31+
else
32+
gh release create "${RELEASE_DATE}" \
33+
--title "${RELEASE_DATE}" \
34+
--notes "Monthly release for ${RELEASE_DATE}. This release was automatically created by GitHub Actions."
35+
fi

0 commit comments

Comments
 (0)