Skip to content

Commit 636f562

Browse files
Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12307996607
2 parents 42094e6 + f7687af commit 636f562

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/draft-release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,31 @@ env:
2121
PHP_VERSION: "8.2"
2222

2323
jobs:
24+
skip:
25+
name: Check whether to ignore this tag
26+
runs-on: ubuntu-20.04
27+
28+
outputs:
29+
skip: ${{ steps.exists.outputs.exists == 'true' }}
30+
31+
steps:
32+
- name: Check if release already exists
33+
id: exists
34+
env:
35+
GH_TOKEN: ${{ github.token }}
36+
run: |
37+
exists=false
38+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
39+
tag="$(echo "${{ github.ref }}" | cut -d/ -f3-)"
40+
if gh release view "$tag" --repo "${{ github.repository }}"; then
41+
exists=true
42+
fi
43+
fi
44+
echo exists=$exists >> $GITHUB_OUTPUT
45+
2446
check:
47+
needs: [skip]
48+
if: needs.skip.outputs.skip != 'true'
2549
name: Check release
2650
uses: ./.github/workflows/draft-release-pr-check.yml
2751

0 commit comments

Comments
 (0)