Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci(release): cut a GitHub Release once npm + Docker artifacts exist - #49

Merged
mr-kelly merged 1 commit into
mainfrom
ci/release-workflow
Sep 4, 2026
Merged

ci(release): cut a GitHub Release once npm + Docker artifacts exist#49
mr-kelly merged 1 commit into
mainfrom
ci/release-workflow

Conversation

@mr-kelly

@mr-kelly mr-kelly commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The problem

The releases page shows two orphan tags, both cut 2026-08-26 (v0.19.1, v0.19.2), while npm already ships 0.40.1. It understates the project by 21 minor versions.

Two costs:

  • To anyone assessing maturity — a user, a reviewer on a curated list — the project looks two months old and barely released. The reality is 55 npm versions and 13 400 Docker pulls.
  • After a listing lands, lists like awesome-selfhosted read current_release from that page and their check-unmaintained-projects job files issues against stale entries. A live project would be flagged as abandoned.

Why a third workflow, not a step in publish-npm.yml

Publish npm and Docker are independent workflows with different path filters. A commit under apps/busabase-cli/** runs only the first; a commit under apps/busabase/** runs both. Tacking a release onto either one would cut a release announcing artifacts that do not exist yet.

So this runs after either completes and gates on the artifacts themselves:

  • npm view busabase@<version> must succeed, and
  • hub.docker.com/v2/repositories/busabase/busabase/tags/<version> must return 200.

Whichever workflow finishes last finds both present and cuts the release; the earlier one finds one missing and exits 0. No barrier — so a commit that only triggers one of the two still releases, instead of deadlocking waiting for a run that never happens.

Properties

  • Idempotent. An existing release exits 0 without touching anything, matching publish-npm.yml's npm view ... && skip philosophy. Re-running is always safe.
  • Tags the right commit. For workflow_run, github.sha is the branch tip, which may have moved; it uses workflow_run.head_sha.
  • Only releases on successworkflow_run also fires on failure.
  • workflow_dispatch for manual runs and for the first one.

Release body

Install commands, a table of the five published packages with their versions, the multi-arch image tags on Docker Hub and GHCR, then GitHub's own "What's Changed" from the PRs since the previous release (via the releases/generate-notes API — verified to produce clean output on this repo's PR history).

Not backfilled, deliberately

GitHub cannot backdate published_at. Backfilling the ~20 missing versions would create twenty releases all claiming today's date, which misrepresents the history more than their absence does. The next release will jump from v0.19.2 to v0.40.x — odd-looking, but true.

🤖 Generated with Claude Code

The releases page currently shows two orphan tags cut on 2026-08-26 (v0.19.1,
v0.19.2) while npm ships 0.40.1 — it understates the project by 21 minor
versions. That reads as "barely released" to anyone assessing maturity, and
after a listing lands, curated lists like awesome-selfhosted read
`current_release` from that page and flag live projects as unmaintained.

This is a third workflow rather than a step at the end of publish-npm.yml
because `Publish npm` and `Docker` are independent workflows with different path
filters — a commit under apps/busabase-cli/** runs only the first. Appending a
release to either would announce artifacts that do not exist yet.

Instead it runs after EITHER completes and gates on the artifacts themselves:
the release is created only once busabase@<version> is on npm AND the matching
Docker Hub tag exists. Whichever workflow finishes last finds both and cuts the
release; the earlier one no-ops. No barrier, so a single-workflow commit still
releases.

Idempotent like the rest of this repo's publishing: an existing release exits 0.
Tags the commit the triggering run actually built, not the branch tip.

Nothing is backfilled — GitHub cannot backdate published_at, so backfilled
releases would all claim today's date and misrepresent the history more than
their absence does.

Co-Authored-By: Claude Opus 5 <[email protected]>
@mr-kelly
mr-kelly merged commit e4fc27d into main Sep 4, 2026
12 of 14 checks passed
@mr-kelly
mr-kelly deleted the ci/release-workflow branch September 4, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant