Skip to content

Commit 45d02c6

Browse files
committed
fix: address cd.yml workflow issues
- Restrict release body update to only release events (not tag pushes) - Fix heredoc indentation using multiple -m flags instead This prevents gh release edit from failing when tags are pushed without an existing GitHub Release.
1 parent e931fe6 commit 45d02c6

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,9 @@ jobs:
6363
git checkout -b "$BRANCH_NAME"
6464
6565
# Commit with Claude Code signature
66-
git commit -m "$(cat <<'EOF'
67-
docs: update changelog
68-
69-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
70-
71-
Co-Authored-By: Claude <noreply@anthropic.com>
72-
EOF
73-
)"
66+
git commit -m "docs: update changelog" \
67+
-m "🤖 Generated with [Claude Code](https://claude.com/claude-code)" \
68+
-m "Co-Authored-By: Claude <noreply@anthropic.com>"
7469
7570
# Push and create PR
7671
git push origin "$BRANCH_NAME"
@@ -90,17 +85,10 @@ jobs:
9085
GH_TOKEN: ${{ github.token }}
9186

9287
- name: Update GitHub release body
93-
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
88+
if: github.event_name == 'release'
9489
run: |
95-
# Extract version from tag or release
96-
if [ "${{ github.event_name }}" = "release" ]; then
97-
TAG_NAME="${{ github.event.release.tag_name }}"
98-
else
99-
TAG_NAME="${GITHUB_REF#refs/tags/}"
100-
fi
101-
10290
# Update release body with latest changelog
103-
gh release edit "$TAG_NAME" \
91+
gh release edit "${{ github.event.release.tag_name }}" \
10492
--notes "${{ steps.git-cliff-latest.outputs.content }}" \
10593
--repo ${{ github.repository }}
10694
env:

0 commit comments

Comments
 (0)