@@ -39,11 +39,11 @@ jobs:
3939 - name : Check if tag already exists
4040 id : check-tag
4141 run : |
42- if git ls-remote --tags origin | grep -q "refs/tags/v ${{ steps.version.outputs.version }}$"; then
43- echo "Tag v ${{ steps.version.outputs.version }} already exists"
42+ if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.version.outputs.version }}$"; then
43+ echo "Tag ${{ steps.version.outputs.version }} already exists"
4444 echo "tag_exists=true" >> $GITHUB_OUTPUT
4545 else
46- echo "Tag v ${{ steps.version.outputs.version }} does not exist"
46+ echo "Tag ${{ steps.version.outputs.version }} does not exist"
4747 echo "tag_exists=false" >> $GITHUB_OUTPUT
4848 fi
4949
5555 git config user.name "github-actions[bot]"
5656 git config user.email "github-actions[bot]@users.noreply.github.com"
5757
58- TAG_NAME="v ${{ steps.version.outputs.version }}"
58+ TAG_NAME="${{ steps.version.outputs.version }}"
5959
6060 git tag "$TAG_NAME"
6161 git push origin "$TAG_NAME"
6767 env :
6868 GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
6969 run : |
70- TAG_NAME="v ${{ steps.version.outputs.version }}"
70+ TAG_NAME="${{ steps.version.outputs.version }}"
7171
7272 gh release create "$TAG_NAME" \
7373 --title "Release $TAG_NAME" \
7979 uses : slackapi/slack-github-action@v2.0.0
8080 env :
8181 REPO_URL : " ${{github.server_url}}/${{github.repository}}"
82- RELEASE_URL : " ${{github.server_url}}/${{github.repository}}/releases/tag/v ${{ steps.version.outputs.version }}"
82+ RELEASE_URL : " ${{github.server_url}}/${{github.repository}}/releases/tag/${{ steps.version.outputs.version }}"
8383 with :
8484 webhook : ${{ secrets.RELEASES_SLACK_WEBHOOK }}
8585 webhook-type : incoming-webhook
8686 payload : |
87- text: "<${{ env.RELEASE_URL }}|v ${{ steps.version.outputs.version }}> has been released for <${{ env.REPO_URL }}|${{ github.repository }}>"
87+ text: "<${{ env.RELEASE_URL }}|${{ steps.version.outputs.version }}> has been released for <${{ env.REPO_URL }}|${{ github.repository }}>"
0 commit comments