Skip to content

Commit 4de5dd4

Browse files
committed
edit migrate releases yaml
1 parent 1683f28 commit 4de5dd4

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

.github/workflows/edit-releases.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,27 @@ jobs:
8888
8989
TAG="v$VERSION"
9090
91-
# The heredoc content starts here.
92-
# Note: The 'EOF_BODY_CONTENT' line MUST NOT have any leading spaces.
93-
# Bash's 'read -r -d '' VAR << EOF' reads until 'EOF' is on a line by itself.
94-
read -r -d '' RELEASE_BODY << EOF_BODY_CONTENT
95-
# Install
96-
\`\`\`bash
97-
curl -L https://rindexer.xyz/install.sh | bash -s -- --version $VERSION
98-
\`\`\`
99-
EOF_BODY_CONTENT
91+
# --- START OF FIX: Constructing RELEASE_BODY with an array ---
92+
# Define each line of the release body in an array
93+
# Note: No leading spaces on these lines, the formatting is part of the string
94+
RELEASE_BODY_LINES=(
95+
"# Install"
96+
"\`\`\`bash"
97+
"curl -L https://rindexer.xyz/install.sh | bash -s -- --version $VERSION"
98+
"\`\`\`"
99+
)
100100
101-
echo "Attempting to edit release $TAG..."
102-
gh release edit "$TAG" \
103-
--repo ${{ github.repository }} \
104-
--prerelease=false \
105-
--notes "$RELEASE_BODY" \
106-
--target master
107-
108-
echo "Successfully edited release $TAG."
101+
# Join the array elements with newlines to form the final string
102+
# This ensures no YAML-related indentation issues
103+
RELEASE_BODY=$(printf "%s\n" "${RELEASE_BODY_LINES[@]}")
104+
# --- END OF FIX ---
105+
106+
echo "Attempting to edit release "$TAG"..."
107+
gh release edit "$TAG" \
108+
--repo ${{ github.repository }} \
109+
--prerelease=false \
110+
--notes "$RELEASE_BODY" \
111+
--target master
112+
113+
echo "Successfully edited release "$TAG"."
109114
done

0 commit comments

Comments
 (0)