Skip to content

Commit 52c0ac4

Browse files
authored
chore: release via GH action from softprops (#556)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 4390ece commit 52c0ac4

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,21 @@ jobs:
4545
run: |
4646
VERSION=`cat semver.txt`
4747
echo "version=$VERSION" >> $GITHUB_OUTPUT
48+
if [[ "$VERSION" =~ (alpha|beta|rc) ]]
49+
then
50+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
51+
else
52+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
53+
fi
4854
- name: Create github release and git tag for release
4955
id: create_release
50-
# see https://github.com/actions/create-release
51-
uses: actions/create-release@v1
56+
# see https://github.com/softprops/action-gh-release
57+
uses: softprops/action-gh-release@v2
5258
env:
5359
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5460
with:
55-
release_name: ${{ steps.set_version.outputs.version }}
61+
name: ${{ steps.set_version.outputs.version }}
5662
tag_name: v${{ steps.set_version.outputs.version }}
5763
draft: false
58-
prerelease: false
64+
prerelease: ${{ steps.set_version.outputs.prerelease }}
65+
target_commitish: ${{ github.head_ref || github.ref_name }}

semver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.2
1+
5.2.3-alpha1

0 commit comments

Comments
 (0)