Skip to content

Commit 1a20bf3

Browse files
Create GitHub release
1 parent 2fdaccd commit 1a20bf3

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,26 @@ jobs:
8080
git tag "v${MAJOR}" --force
8181
git push origin "v${MAJOR}" --force
8282
fi
83+
84+
- name: 🚀 Create GitHub release for stable versions
85+
env:
86+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
shell: bash
88+
run: |
89+
VERSION="${{ github.event.client_payload.version }}"
90+
91+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
92+
echo "Preview version detected ($VERSION). Skipping release creation."
93+
exit 0
94+
fi
95+
96+
TAG="v${VERSION}"
97+
98+
if gh release view "$TAG" >/dev/null 2>&1; then
99+
echo "Release $TAG already exists. Skipping creation."
100+
exit 0
101+
fi
102+
103+
gh release create "$TAG" \
104+
--title "$TAG" \
105+
--verify-tag

0 commit comments

Comments
 (0)