Skip to content

Commit 21655d1

Browse files
committed
👷 update release script
1 parent b895ed2 commit 21655d1

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: "Version"
7+
description: |
8+
New version for the release
9+
If the version is in format <major>.<minor>.<patch> a new release is emitted.
10+
Otherwise for other format ( for example <major>.<minor>.<patch>-beta.1 ), a prerelease is emitted.
811
default: "0.0.1"
912
required: true
1013
type: string
@@ -15,6 +18,8 @@ on:
1518
jobs:
1619
release:
1720
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
1823
steps:
1924
- uses: actions/checkout@v2
2025

@@ -71,15 +76,15 @@ jobs:
7176
git tag v$( echo $VERSION | cut -d. -f 1-1 )
7277
git tag v$( echo $VERSION | cut -d. -f 1-2 )
7378
git push origin --tags --force
74-
echo ::set-output name=prerelease::false
79+
echo "prerelease=false" >> $GITHUB_OUTPUT
7580
else
76-
echo ::set-output name=prerelease::true
81+
echo "prerelease=true" >> $GITHUB_OUTPUT
7782
fi
7883
79-
- uses: actions/create-release@v1
84+
- uses: ncipollo/release-action@v1.11.1
8085
env:
8186
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8287
with:
83-
tag_name: v${{ github.event.inputs.version }}
88+
tag: v${{ github.event.inputs.version }}
8489
body: ${{ github.event.inputs.description }}
8590
prerelease: ${{ steps.push-tags.outputs.prerelease }}

0 commit comments

Comments
 (0)