aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 00:23:04 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 00:23:04 +0300
commitd2aa8865911ded97a67054fb2392a1c12fae018c (patch)
tree585f8665dbf0868c8e6cf6fa7a1406b6c09391b2 /.github/workflows/release.yml
parent8d4cc05be0c696db2aabca7e9995e59019a01469 (diff)
chore: label included issues for next release
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml21
1 files changed, 15 insertions, 6 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 531ffe68..d479d4e3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -145,6 +145,7 @@ jobs:
shell: bash
env:
GH_TOKEN: ${{ github.token }}
+ NEXT_RELEASE_LABEL: included-in-next-release
run: |
set -euo pipefail
@@ -183,14 +184,22 @@ jobs:
continue
fi
- if [ "$(jq -r '.state' <<<"$data")" != "open" ]; then
- echo "Skipping #$issue because it is not open."
- continue
+ HAS_NEXT_RELEASE_LABEL="$(jq -r --arg label "$NEXT_RELEASE_LABEL" 'any(.labels[].name; . == $label)' <<<"$data")"
+
+ if [ "$(jq -r '.state' <<<"$data")" = "open" ]; then
+ if ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed --comment "Released in [v${VERSION}](${RELEASE_URL})."; then
+ echo "::warning::Could not close issue #$issue."
+ continue
+ fi
+ else
+ echo "Skipping close for #$issue because it is not open."
fi
- if ! gh issue close "$issue" --repo "$GITHUB_REPOSITORY" --reason completed --comment "Released in [v${VERSION}](${RELEASE_URL})."; then
- echo "::warning::Could not close issue #$issue."
- continue
+ if [ "$HAS_NEXT_RELEASE_LABEL" = "true" ]; then
+ if ! gh issue edit "$issue" --repo "$GITHUB_REPOSITORY" --remove-label "$NEXT_RELEASE_LABEL"; then
+ echo "::warning::Could not remove $NEXT_RELEASE_LABEL from issue #$issue."
+ continue
+ fi
fi
done