Skip to content

Commit 5101bfc

Browse files
aksOpsclaude
andcommitted
fix(publish): use file-based release notes to avoid heredoc escaping issues
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6feaf72 commit 5101bfc

1 file changed

Lines changed: 44 additions & 43 deletions

File tree

.github/workflows/publish.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -25,52 +25,53 @@ jobs:
2525
env:
2626
OUTPUT: CHANGELOG.md
2727

28-
- name: Update release notes
28+
- name: Write release notes
2929
env:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
TAG: ${{ github.event.release.tag_name }}
32-
MODULE: github.com/${{ github.repository }}
32+
REPO: ${{ github.repository }}
3333
run: |
34-
CHANGELOG=$(cat CHANGELOG.md 2>/dev/null || echo "")
34+
CHANGELOG=$(cat CHANGELOG.md 2>/dev/null || echo "_No changelog entries found._")
3535
36-
NOTES=$(cat <<RELEASE_NOTES
37-
## Installation
36+
{
37+
echo "## Install"
38+
echo ""
39+
echo "\`\`\`bash"
40+
echo "go install github.com/${REPO}@${TAG}"
41+
echo "\`\`\`"
42+
echo ""
43+
echo "## Build from source"
44+
echo ""
45+
echo "\`\`\`bash"
46+
echo "git clone https://github.com/${REPO}.git"
47+
echo "cd $(basename ${REPO})"
48+
echo "CGO_ENABLED=0 go build -o docsgraph ."
49+
echo "\`\`\`"
50+
echo ""
51+
echo "## Quick start"
52+
echo ""
53+
echo "\`\`\`bash"
54+
echo "# Copy sample config"
55+
echo "mkdir -p ~/.docsgraph"
56+
echo "curl -sSL https://raw.githubusercontent.com/${REPO}/${TAG}/config.example.yaml \\"
57+
echo " -o ~/.docsgraph/config.yaml"
58+
echo ""
59+
echo "# Index documents"
60+
echo "docsgraph index ./your-docs/"
61+
echo ""
62+
echo "# Build knowledge graph (community detection)"
63+
echo "docsgraph index --finalize"
64+
echo ""
65+
echo "# Start MCP + Web UI server"
66+
echo "docsgraph serve --port 8080"
67+
echo "# Web UI → http://localhost:8080"
68+
echo "# MCP SSE → http://localhost:8080/mcp/sse"
69+
echo "# REST API → http://localhost:8080/api/"
70+
echo "\`\`\`"
71+
echo ""
72+
echo "## What's Changed"
73+
echo ""
74+
echo "${CHANGELOG}"
75+
} > release_notes.md
3876
39-
### Go install (recommended)
40-
\`\`\`bash
41-
go install ${MODULE}@${TAG}
42-
\`\`\`
43-
44-
### From source
45-
\`\`\`bash
46-
git clone https://github.com/${GITHUB_REPOSITORY}.git
47-
cd $(basename ${GITHUB_REPOSITORY})
48-
CGO_ENABLED=0 go build -o docsgraph .
49-
\`\`\`
50-
51-
### Quick start
52-
\`\`\`bash
53-
# Copy sample config
54-
mkdir -p ~/.docsgraph
55-
curl -sSL https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${TAG}/config.example.yaml \
56-
-o ~/.docsgraph/config.yaml
57-
58-
# Index documents
59-
docsgraph index ./your-docs/
60-
61-
# Finalize graph (community detection)
62-
docsgraph index --finalize
63-
64-
# Start MCP + Web UI server
65-
docsgraph serve --port 8080
66-
# Web UI → http://localhost:8080
67-
# MCP SSE → http://localhost:8080/mcp/sse
68-
# REST API → http://localhost:8080/api/
69-
\`\`\`
70-
71-
## What's Changed
72-
${CHANGELOG}
73-
RELEASE_NOTES
74-
)
75-
76-
gh release edit "$TAG" --notes "$NOTES"
77+
gh release edit "$TAG" --notes-file release_notes.md

0 commit comments

Comments
 (0)