From 07fc2c5841674659e4074d8df51f5b72b0df539e Mon Sep 17 00:00:00 2001 From: Gwhyyy Date: Fri, 17 Feb 2023 22:06:42 +0100 Subject: [PATCH] [ Add ] added workflow --- .github/workflows/release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7654ed74..7fc524c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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