mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
prevent replacing release on draft action
This commit is contained in:
parent
032f133189
commit
a46edf400f
1 changed files with 14 additions and 1 deletions
15
.github/workflows/draft.yml
vendored
15
.github/workflows/draft.yml
vendored
|
@ -20,7 +20,20 @@ jobs:
|
|||
- name: Declare Version Variable
|
||||
id: ref
|
||||
shell: bash
|
||||
run: echo "version=$(unzip -p ${{ github.workspace }}/dev/geode-nightly.zip geode-sdk-geode-*/VERSION | xargs)" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
VERSION=$(unzip -p ${{ github.workspace }}/dev/geode-nightly.zip geode-sdk-geode-*/VERSION | xargs)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# test if release already exists
|
||||
set +e
|
||||
curl --fail "https://api.github.com/repos/geode-sdk/geode/releases/tags/v$VERSION" --silent --output /dev/null
|
||||
RESULT=$?
|
||||
set -e
|
||||
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
echo "Release $VERSION already exists! Not replacing it.."
|
||||
exit 1
|
||||
else
|
||||
|
||||
- name: Move Files
|
||||
run: |
|
||||
|
|
Loading…
Reference in a new issue