Skip to content

Commit 6fd12ed

Browse files
committed
ci: delete nightly pre-releases when an RC is published
An RC supersedes the nightly line: after the manually dispatched RC release goes out, all nightly pre-releases are removed, mirroring the superseded-nightly cleanup in pre-release.yml.
1 parent 1719a45 commit 6fd12ed

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ jobs:
6161
generate_release_notes: true
6262
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
6363

64+
# An RC supersedes the nightly line: once a release candidate is out,
65+
# the nightly pre-releases are removed like superseded nightlies are.
66+
- name: Delete superseded nightly pre-releases
67+
if: ${{ github.event_name == 'workflow_dispatch' }}
68+
env:
69+
GH_TOKEN: ${{ github.token }}
70+
run: |
71+
set -euo pipefail
72+
73+
gh release list \
74+
--limit 1000 \
75+
--json tagName,isPrerelease \
76+
--jq '.[] | select(.isPrerelease and (.tagName | test("-nightly[0-9]+$"))) | .tagName' |
77+
while IFS= read -r nightly_tag; do
78+
gh release delete "$nightly_tag" --cleanup-tag --yes
79+
echo "Deleted superseded nightly ${nightly_tag}." >> "$GITHUB_STEP_SUMMARY"
80+
done
81+
6482
- name: Create maintenance branch
6583
if: ${{ github.event_name == 'push' }}
6684
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ and adds a final version bump commit. For example, if `metadata.json` on `releas
103103

104104
Release candidates are published alongside GNOME Shell RCs. Tags follow the pattern `v50-rc1`, `v50-rc2`, etc. RC releases are marked as **pre-releases** on GitHub.
105105

106-
Pushing an RC tag does **not** publish anything. After pushing the tag, trigger the `Release` workflow manually (`workflow_dispatch`) and pass the tag name in the `tag` input. The workflow validates that the tag contains `-rc`, runs CI against it, and publishes the pre-release.
106+
Pushing an RC tag does **not** publish anything. After pushing the tag, trigger the `Release` workflow manually (`workflow_dispatch`) and pass the tag name in the `tag` input. The workflow validates that the tag contains `-rc`, runs CI against it, and publishes the pre-release. An RC supersedes the nightly line, so publishing one deletes all nightly pre-releases.
107107

108108
### Stable releases
109109

0 commit comments

Comments
 (0)