Skip to content

Commit 7a58118

Browse files
committed
Add automatic GitHub Discussions post for stable releases
Configure release workflow to automatically create a discussion post in the CI-CD category when stable releases are published. **Changes:** - Conditionally add --discussion-category ci-cd flag to gh release create - Only applies to stable releases (not nightly or development builds) **Category ID:** DIC_kwDOACA_5s4Cxk-W This matches the pattern used in zlmdb and cfxdb for automated release announcements.
1 parent 73febd0 commit 7a58118

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,18 +1667,21 @@ jobs:
16671667
# Delete existing release if it exists (for nightly builds)
16681668
gh release delete "$RELEASE_NAME" --repo "$GITHUB_REPOSITORY" --yes || true
16691669
1670-
# Set release title based on type
1670+
# Set release title and discussion category based on type
16711671
if [ "$RELEASE_TYPE" = "stable" ]; then
16721672
TITLE="Release $RELEASE_NAME"
1673+
DISCUSSION_FLAG="--discussion-category ci-cd"
16731674
else
16741675
TITLE="Nightly Build $RELEASE_NAME"
1676+
DISCUSSION_FLAG=""
16751677
fi
16761678
16771679
# Create the release using rendered notes
16781680
gh release create "$RELEASE_NAME" \
16791681
--repo "$GITHUB_REPOSITORY" \
16801682
--title "$TITLE" \
16811683
--notes-file release-notes.md \
1684+
$DISCUSSION_FLAG \
16821685
release-artifacts/*
16831686
16841687
echo "✅ Release $RELEASE_NAME created successfully"

0 commit comments

Comments
 (0)