Skip to content

Commit e58880f

Browse files
committed
fix(release): also update notes on an existing release
The manually-created release lacks the install instructions the CI-created draft normally has. Overwrite its notes with the same content before uploading assets. Signed-off-by: Juho Vainio <juho.vainio@amd.com>
1 parent ca05979 commit e58880f

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,7 @@ jobs:
149149
GH_TOKEN: ${{ github.token }}
150150
run: |
151151
VERSION="${{ steps.version.outputs.value }}"
152-
if gh release view "${VERSION}" >/dev/null 2>&1; then
153-
gh release upload "${VERSION}" dist/*.tar.gz dist/*.tar.gz.sha256 dist/*.sig --clobber
154-
exit 0
155-
fi
156-
gh release create "${VERSION}" \
157-
--draft \
158-
--title "rocm-cli ${VERSION}" \
159-
--notes "$(cat <<EOF
152+
NOTES="$(cat <<EOF
160153
Install the latest stable release on Linux x86_64:
161154
162155
\`\`\`bash
@@ -175,7 +168,16 @@ jobs:
175168
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/install.sh | sh -s -- ${VERSION}
176169
\`\`\`
177170
EOF
178-
)" \
171+
)"
172+
if gh release view "${VERSION}" >/dev/null 2>&1; then
173+
gh release edit "${VERSION}" --notes "${NOTES}"
174+
gh release upload "${VERSION}" dist/*.tar.gz dist/*.tar.gz.sha256 dist/*.sig --clobber
175+
exit 0
176+
fi
177+
gh release create "${VERSION}" \
178+
--draft \
179+
--title "rocm-cli ${VERSION}" \
180+
--notes "${NOTES}" \
179181
dist/*.tar.gz dist/*.tar.gz.sha256 dist/*.sig
180182
181183
windows-release:

0 commit comments

Comments
 (0)