mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed draft release being created on release publish
This commit is contained in:
parent
67b9d6222d
commit
f7687af337
24
.github/workflows/draft-release.yml
vendored
24
.github/workflows/draft-release.yml
vendored
@ -21,7 +21,31 @@ env:
|
|||||||
PHP_VERSION: "8.2"
|
PHP_VERSION: "8.2"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
skip:
|
||||||
|
name: Check whether to ignore this tag
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
skip: ${{ steps.exists.outputs.exists == 'true' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check if release already exists
|
||||||
|
id: exists
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
exists=false
|
||||||
|
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||||
|
tag="$(echo "${{ github.ref }}" | cut -d/ -f3-)"
|
||||||
|
if gh release view "$tag" --repo "${{ github.repository }}"; then
|
||||||
|
exists=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo exists=$exists >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
check:
|
check:
|
||||||
|
needs: [skip]
|
||||||
|
if: needs.skip.outputs.skip != 'true'
|
||||||
name: Check release
|
name: Check release
|
||||||
uses: ./.github/workflows/draft-release-pr-check.yml
|
uses: ./.github/workflows/draft-release-pr-check.yml
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user