Skip to content

Commit 84dd1bc

Browse files
committed
Update build.yml
1 parent b48b0ff commit 84dd1bc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- master
88
workflow_dispatch:
99

10+
concurrency:
11+
group: release-${{ github.ref }}
12+
cancel-in-progress: false
13+
1014
jobs:
1115
build:
1216
name: Build ${{ matrix.target }} - ${{ matrix.arch }}
@@ -210,10 +214,28 @@ jobs:
210214
echo "Generated checksums:"
211215
cat SHA256SUMS.txt
212216
217+
- name: Check if beta release
218+
run: |
219+
VERSION=$(node -p "require('./package.json').version")
220+
if [[ "$VERSION" == *"beta"* ]] || [[ "$VERSION" == *"alpha"* ]]; then
221+
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
222+
else
223+
echo "IS_PRERELEASE=false" >> $GITHUB_ENV
224+
fi
225+
226+
- name: Delete existing release if present
227+
run: |
228+
# Delete the release if it already exists (to handle retries)
229+
gh release delete "${{ env.TAG_NAME }}" --yes 2>/dev/null || true
230+
env:
231+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232+
213233
- name: Upload GitHub Release
214234
uses: softprops/action-gh-release@v1
215235
with:
216236
tag_name: ${{ env.TAG_NAME }}
237+
prerelease: ${{ env.IS_PRERELEASE }}
238+
generate_release_notes: true
217239
files: |
218240
release-artifacts/*.exe
219241
release-artifacts/*.blockmap

0 commit comments

Comments
 (0)