Skip to content

Fail CI when the latest release loses skill-demo.pdf - #20

Merged
glukicov merged 2 commits into
mainfrom
ci/verify-release-asset
Aug 31, 2026
Merged

glukicov merged 2 commits into
mainfrom
ci/verify-release-asset

Conversation

@glukicov

Copy link
Copy Markdown
Owner

What

A new workflow, .github/workflows/release-assets.yml, that fails when the release GitHub calls latest does not carry skill-demo.pdf.

Why

README.md links to releases/latest/download/skill-demo.pdf. That URL resolves only while the latest release has an asset under exactly that filename.

v1.1.0 shipped at 15:41 with no assets attached, became latest, and the README link 404'd until v1.1.1 went out at 16:35 with the asset. Nobody reported it. The rule was already written down when v1.0.0 was tagged and it still broke, which is the argument for a check instead of a reminder.

How it works

  • Triggers on release events (published, edited, released, deleted), weekly on a cron, and on workflow_dispatch.
  • Polls for up to two minutes before failing, because gh release create uploads assets after the release row exists, so the published event can arrive ahead of the file.
  • Then fetches the public URL and checks both that it returns 200 and that the body starts with %PDF-. A 200 alone is not enough, since an error page is also a 200.
  • permissions: contents: read, matching ci.yml.

Verification

The exact shell in both steps was run against the live repo:

asset present on v1.1.1
http 200  magic %PDF-

Nothing in ci.yml is touched, so the three required check names are unchanged.

🤖 Generated with Claude Code

glukicov and others added 2 commits August 31, 2026 18:25
The README links to releases/latest/download/skill-demo.pdf, which only
resolves while the release GitHub calls "latest" carries an asset under
exactly that filename.

v1.1.0 shipped with no assets, became latest, and the link 404'd for the
54 minutes until v1.1.1 replaced it. The rule was already written down
and it still broke, so make it a check rather than a thing to remember.

Runs on release events, weekly, and on demand. It polls first, because
`gh release create` uploads assets after the release row exists, then
verifies the public URL returns 200 and that the body really is a PDF.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@glukicov
glukicov merged commit 66af7de into main Aug 31, 2026
3 checks passed
@glukicov
glukicov deleted the ci/verify-release-asset branch August 31, 2026 17:31
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