File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 steps :
1717 - name : Checkout code
1818 uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
1921
2022 - name : Setup Node.js
2123 uses : actions/setup-node@v4
@@ -55,11 +57,19 @@ jobs:
5557 run : |
5658 TAG="${{ steps.version.outputs.tag }}"
5759 BODY="${{ steps.tag_message.outputs.message }}"
58- gh release create "$TAG" \
60+
61+ # Check if release already exists
62+ if gh release view "$TAG" &>/dev/null; then
63+ echo "Release $TAG already exists, skipping creation"
64+ exit 0
65+ fi
66+
67+ # Create release using GitHub CLI
68+ echo "$BODY" | gh release create "$TAG" \
5969 --title "Release $TAG" \
60- --notes "$BODY"
70+ --notes-file -
6171 env :
62- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72+ GITHUB_TOKEN : ${{ github.token }}
6373
6474 - name : Update package.json version (CI only, not committed)
6575 run : |
You can’t perform that action at this time.
0 commit comments