Action: Check if release exists before releasing
This commit is contained in:
parent
c07828f411
commit
0b39a4bf5e
1 changed files with 12 additions and 0 deletions
|
@ -5,7 +5,19 @@ on:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-release-exists:
|
||||||
|
runs-on: any_archLinux
|
||||||
|
outputs:
|
||||||
|
status: ${{ steps.release_exists_check.conclusion }}
|
||||||
|
steps:
|
||||||
|
- name: Check if release already exists
|
||||||
|
id: release_exists_check
|
||||||
|
run: |
|
||||||
|
curl -X GET "https://git.seodisparate.com/api/v1/repos/stephenseo/TurnBasedMinecraftMod/releases/tags/${GITHUB_REF_NAME}" \
|
||||||
|
-H 'accept: application/json' -w '%{http_code}' -o release_check_resp.json 2>/dev/null | grep 200
|
||||||
build-and-create-release:
|
build-and-create-release:
|
||||||
|
needs: check-release-exists
|
||||||
|
if: needs.check-release-exists.outputs.status == 'failure'
|
||||||
runs-on: any_archLinux
|
runs-on: any_archLinux
|
||||||
steps:
|
steps:
|
||||||
- run: git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/TurnBasedMinecraftMod.git TurnBasedMinecraftMod
|
- run: git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/TurnBasedMinecraftMod.git TurnBasedMinecraftMod
|
||||||
|
|
Loading…
Reference in a new issue