Skip to content

Bulk-delete historical per-package GitHub Releases (#13 follow-up) #55

Description

@zachdunn

Context

Every CLI publish from 0.12.1 through 0.19.1 created 8 GitHub Releases per version:

  • 1 consolidated v* release with the 4 platform binaries + checksums + change notes (the intended one — this is what Homebrew pulls, what users land on, what we keep).
  • 7 per-package shells (@buildinternet/releases@X.Y.Z, the 4 platform packages, -lib, -skills) auto-generated by changesets/action@v1 because createGithubReleases defaulted to true. No assets, duplicate patch notes.

Fix-forward shipped in #54 (2026-04-22): createGithubReleases: false on the action. Future publishes will only produce the one v* release. The historical shells remain.

Current state

80 total releases on buildinternet/releases-cli: 9 real, 71 shells.

Version Per-package shells
0.12.1 5
0.13.2 8
0.14.0 8
0.15.0 8
0.16.0 7
0.16.1 7
0.17.0 7
0.18.0 7
0.19.0 7
0.19.1 7
total 71

(0.12.1 and 0.13.2 have 5 and 8 respectively because the fixed-group membership shifted over time — releases-core was a member before it got carved out to the monorepo in #370 / #393, and -lib / -skills existed for some of the older versions but not all.)

Proposed cleanup

Delete the 71 per-package releases, keep their git tags intact (so npm provenance and changelog-gen references don't break).

for v in 0.12.1 0.13.2 0.14.0 0.15.0 0.16.0 0.16.1 0.17.0 0.18.0 0.19.0 0.19.1; do
  for pkg in releases releases-lib releases-skills \
             releases-darwin-arm64 releases-darwin-x64 \
             releases-linux-arm64 releases-linux-x64; do
    gh release delete "@buildinternet/${pkg}@${v}" \
      --repo buildinternet/releases-cli \
      --yes --cleanup-tag=false || true
  done
done

|| true because not every (version × package) combination exists (e.g. releases-core was present for 0.12.1 and 0.13.2 only; -lib / -skills show up later). The loop attempts each combo and skips missing ones.

Impact

Before After
/releases page entries 80 9
Consolidated v* releases (binaries + notes) kept kept
Git tags (all of them) kept kept (--cleanup-tag=false)
npm package versions untouched
Homebrew formula untouched
releases --version, releases admin … untouched

Purely cosmetic cleanup. Destructive for the per-package release entries themselves (their duplicated patch-note bodies go away; /releases history still tells the full story via the v* entries + CHANGELOG.md files shipped in each npm package).

Related: monorepo orphans

buildinternet/releases (the monorepo) also has 26 orphan releases from the pre-split era (when the CLI lived there): 4 cli@* consolidated entries, 20 @buildinternet/*@* per-package shells, and 2 v0.9.x entries of unclear provenance. #13 referenced a single "v0.13.0" orphan, but no tag by that name exists — the wording was imprecise. Worth a separate tracking issue on the monorepo if/when that cleanup is in scope; flagging here so it doesn't get conflated with this one.

Not in scope

Checklist

  • Dry-run the loop and capture output
  • Run the real delete
  • Verify /releases shows 9 entries and the v* releases still carry their assets
  • Verify git ls-remote --tags origin | wc -l is unchanged (tag count preserved)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions