-
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (28 loc) · 688 Bytes
/
release.yml
File metadata and controls
32 lines (28 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
pull-requests: read
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
run: |
PRERELEASE_FLAG=""
if [[ "$TAG_NAME" =~ (dev|alpha|beta|[0-9][ab]|rc) ]]; then
PRERELEASE_FLAG="--prerelease"
fi
gh release create "$TAG_NAME" \
--title "$TAG_NAME" \
--generate-notes \
$PRERELEASE_FLAG