We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1da8c9 commit f75ee37Copy full SHA for f75ee37
.github/workflows/draft-release.yml
@@ -19,6 +19,17 @@ jobs:
19
API_URL="https://api.github.com/repos/geode-sdk/cli/actions/workflows/build.yml/runs?per_page=1&branch=$BRANCH&event=push&status=success"
20
RUN_ID=$(curl $API_URL | jq .workflow_runs[0].id)
21
22
+ # test if release already exists
23
+ set +e
24
+ curl --fail "https://api.github.com/repos/geode-sdk/cli/releases/tags/$VERSION" --silent --output /dev/null
25
+ RESULT=$?
26
+ set -e
27
+
28
+ if [ $RESULT -eq 0 ]; then
29
+ echo "Release $VERSION already exists! Not replacing it.."
30
+ exit 1
31
+ fi
32
33
echo "version=$VERSION" >> $GITHUB_OUTPUT
34
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
35
@@ -76,4 +87,4 @@ jobs:
76
87
- Something
77
88
draft: true
78
89
files: |
79
- ./artifacts/*.zip
90
+ ./artifacts/*.zip
0 commit comments