diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e1e363..209644a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,23 +68,32 @@ jobs: package-path: ${{ env.unityPackage }} include-files: metaList - # Make a release tag of the version from the package.json file - - name: Create Tag - id: tag_version - uses: rickstaa/action-create-tag@88dbf7ff6fe2405f8e8f6c6fdfd78829bc631f83 + + # Tag_exists_check + - name: Tag_exists_check + uses: rickstaa/action-contains-tag@v1 with: + reference: "main" tag: "${{ env.version }}" - tag_exists_error: false - + # If Tag exists quit - name: Check if tag exists id: check_tag_exists run: | - if [ "${{ steps.tag_version.outputs.tag_exists }}" == "true" ]; then + if [ "${{ steps.Tag_exists_check.outputs.retval }}" == "true" ]; then echo "Tag already exists. Exiting workflow." exit 1 fi + + # Make a release tag of the version from the package.json file + - name: Create Tag + id: tag_version + uses: rickstaa/action-create-tag@88dbf7ff6fe2405f8e8f6c6fdfd78829bc631f83 + with: + tag: "${{ env.version }}" + + # Publish the Release to GitHub - name: Make Release