Skip to content

Commit

Permalink
👷 update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Platane committed Nov 3, 2022
1 parent b895ed2 commit 21655d1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ on:
workflow_dispatch:
inputs:
version:
description: "Version"
description: |
New version for the release
If the version is in format <major>.<minor>.<patch> a new release is emitted.
Otherwise for other format ( for example <major>.<minor>.<patch>-beta.1 ), a prerelease is emitted.
default: "0.0.1"
required: true
type: string
Expand All @@ -15,6 +18,8 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -71,15 +76,15 @@ jobs:
git tag v$( echo $VERSION | cut -d. -f 1-1 )
git tag v$( echo $VERSION | cut -d. -f 1-2 )
git push origin --tags --force
echo ::set-output name=prerelease::false
echo "prerelease=false" >> $GITHUB_OUTPUT
else
echo ::set-output name=prerelease::true
echo "prerelease=true" >> $GITHUB_OUTPUT
fi
- uses: actions/create-release@v1
- uses: ncipollo/release-action@v1.11.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
tag: v${{ github.event.inputs.version }}
body: ${{ github.event.inputs.description }}
prerelease: ${{ steps.push-tags.outputs.prerelease }}

0 comments on commit 21655d1

Please sign in to comment.