Skip to content

Attach manage.sh + checksum to a release created either way - #14

Merged
AdamXweb merged 1 commit into
AdamXweb:mainfrom
adamXbot:feat/release-assets
Aug 6, 2026
Merged

Attach manage.sh + checksum to a release created either way#14
AdamXweb merged 1 commit into
AdamXweb:mainfrom
adamXbot:feat/release-assets

Conversation

@adamXbot

@adamXbot adamXbot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Answers the question directly: yes — with this change, a release you create in the GitHub UI gets both manage.sh and manage.sh.sha256 attached by the workflow, and your title and notes are left exactly as you wrote them.

Why v0.4.0 got no files

You wrote the release in the UI at 14:01, then pushed the tag at 14:12. The workflow ran, passed the version gate, the shellcheck and the notes extraction, then died on the last step:

a release with the same tag name already exists: v0.4.0

gh release create cannot create what exists. That is the workflow being wrong about how you work, not you using it wrongly — it assumed it would author the release, when in practice your notes are better than a dump of the CHANGELOG section and you title them ("v0.4.0 resilience") rather than taking the bare tag.

What it does now

It guards and supplies instead of authoring:

  • release already exists → gh release upload <tag> manage.sh manage.sh.sha256 --clobber, leaving title and body untouched;
  • no release yet → creates one, CHANGELOG section as a starting point for the notes.

Either order works, and re-running is always safe. The two real gates — tag must match VERSION, and the tagged script must pass shellcheck — are unchanged, because update-self downloads and runs exactly that file.

manage.sh now ships as an asset too, so pinning a version has a stable URL, and the checksum covers exactly the bytes beside it.

One deliberate non-change

update-self still fetches the script from the tag ref, not the asset. A tag always resolves; an asset can be missing — precisely what happened with v0.4.0. Switching to the asset would have turned that failure into a broken upgrade path instead of a cosmetic gap.

Verified

Both branches driven with a stub gh, asserting on the calls made:

scenario gh calls result
release exists viewupload --clobber 0 creates, title/notes untouched
no release viewcreate … manage.sh manage.sh.sha256 release created with both assets
run 3× in a row 3 uploads, 0 creates idempotent

sha256sum -c manage.sh.sha256 returns manage.sh: OK against the published asset. Workflow parses as YAML; every run: block passes sh -n.

For v0.4.0 as it stands

It has no assets, but nothing is broken: I confirmed the checksum URL 404s and update-self skips verification and installs normally. If you want to backfill it, the hash must come from the tagged commit fc05678:

git show v0.4.0:docker_volumes/manage.sh > manage.sh && shasum -a 256 manage.sh > manage.sh.sha256 && gh release upload v0.4.0 manage.sh manage.sh.sha256 --repo AdamXweb/DockerDance

🤖 Generated with Claude Code

The v0.4.0 release was written in the GitHub UI first and the tag pushed
after, so the workflow reached `gh release create` and stopped on "a
release with the same tag name already exists" - the three gates before
it had all passed. Nothing reached the release, which is why v0.4.0
carries no files.

That is the workflow's fault, not the order it was used in. It assumed
it authored the release; in practice the maintainer writes better notes
than a dump of the CHANGELOG section, and titles them ("v0.4.0
resilience") rather than taking the bare tag. So it now guards and
supplies rather than authors: if a release already exists it uploads
manage.sh and manage.sh.sha256 with --clobber and does not touch the
title or body; only when no release exists does it create one, using
that version's CHANGELOG section as a starting point.

manage.sh ships as an asset too, not just its checksum, giving a stable
per-version download URL for anyone pinning a release - and the checksum
now covers exactly the bytes published beside it (sha256sum on the
copied file, rather than hashing the repo path and relabelling it).

update-self keeps fetching the script from the tag ref rather than the
asset. The tag always resolves for any tag that exists, whereas an asset
can be missing - exactly what happened here - so the tag URL is the more
reliable of the two.

Both branches were exercised with a stub gh: with a release present it
makes one `upload --clobber` and zero `create` calls, three consecutive
runs stay idempotent, and `sha256sum -c` verifies the asset as it lands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AdamXweb
AdamXweb merged commit ce9a0b0 into AdamXweb:main Aug 6, 2026
1 check passed
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.

2 participants