Making the pre-release tag configurable based on the tag (#184)

This commit is contained in:
Arpit Mohan 2020-07-28 18:21:40 +05:30 committed by GitHub
parent 66bf23106d
commit 7eda0f0201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,21 @@ jobs:
steps:
# Creating the release on Github
- name: Get the version
id: get_version
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
# If the tag has the string "beta", then mark the Github release as a pre-release
- name: Get the version
id: get_release
run: |
STATUS=false
if [[ ! ${{steps.get_version.outputs.tag}} == *"beta"* ]]; then
STATUS=true
fi
echo ::set-output name=status::${STATUS}
- name: Create Release
id: create_release
uses: actions/create-release@v1
@ -130,5 +145,5 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
prerelease: ${{steps.get_release.outputs.status}}