Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,14 @@ jobs:
TAG="v$VERSION"
RELEASE_URL="$(gh release view "$TAG" --json url --jq .url)"

gh issue list --state open --label "pending-release" --json number --jq '.[].number' | while read -r ISSUE; do
gh issue list --state open --label "pending-release" --json number,labels --jq '.[] | [.number, any(.labels[]; .name == "uniwind-pro")] | @tsv' | while read -r ISSUE IS_PRO; do
if [ "$IS_PRO" = "true" ]; then
MESSAGE="New release is published: https://docs.uniwind.dev/pro/changelog"
else
MESSAGE="New release $TAG is published: $RELEASE_URL"
fi

gh issue edit "$ISSUE" --remove-label "pending-release" || echo "::warning::failed to remove label on #$ISSUE"
gh issue comment "$ISSUE" --body "New release $TAG is published: $RELEASE_URL" || echo "::warning::failed to comment on #$ISSUE"
gh issue comment "$ISSUE" --body "$MESSAGE" || echo "::warning::failed to comment on #$ISSUE"
gh issue close "$ISSUE" || echo "::warning::failed to close #$ISSUE"
done