[ Add ] added workflow
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@ -13,13 +13,9 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Checking commit message
|
||||
|
||||
run: |
|
||||
if grep -q "release" "$GITHUB_EVENT_PATH"; then
|
||||
echo "This commit contains the word 'release'. Creating a release..."
|
||||
else
|
||||
echo "This commit does not contain the word 'release'. Exiting workflow."
|
||||
exit 78
|
||||
fi
|
||||
echo "This commit contains the word 'release'. Creating a release..."
|
||||
|
||||
- name: Extracting Version Number Of The Current Release
|
||||
run: |
|
||||
@ -27,12 +23,20 @@ jobs:
|
||||
echo "VERSION: V$VERSION detected"
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
|
||||
- name: Check if release exists
|
||||
id: check_release
|
||||
uses: peter-evans/release-check@v1
|
||||
with:
|
||||
tag: ${{ env.VERSION }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Creating New Release
|
||||
if: steps.check_release.outputs.release_exists == 'false'
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
release_name: Release ${{ env.VERSION }}
|
||||
release_name: ${{ env.VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
Reference in New Issue
Block a user