Skip to content

Commit 42ee84d

Browse files
committed
add step to create GitHub release if it doesn't exist
1 parent 4ee8eb6 commit 42ee84d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ jobs:
7171
steps:
7272
- name: Checkout code
7373
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74+
75+
- name: Create GitHub Release
76+
run: |
77+
if ! gh release view "${{ github.ref_name }}" > /dev/null 2>&1; then
78+
echo "Creating release ${{ github.ref_name }}"
79+
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --notes "Release ${{ github.ref_name }}"
80+
else
81+
echo "Release ${{ github.ref_name }} already exists"
82+
fi
83+
env:
84+
GH_TOKEN: ${{ github.token }}
7485

7586
- run: make upload
7687
env:

0 commit comments

Comments
 (0)