Repository navigation
Don't lose the release assets when the release already exists - #19
Merged
Merged
Conversation
Publishing a release from the GitHub UI creates its tag, and that tag push is what starts the release workflow. `gh release create` then fails on a release that is already there — and the failure lands after the build, so what survives is a published release with no main.js attached, which is the one shape of release that is useless to Obsidian. Look for the release first and upload onto it when it exists. --clobber also makes re-running a job that died partway through safe, instead of failing on the assets it managed to upload the first time. CONTRIBUTING gains the rule the workflow can't enforce: main.js is a tracked artifact, not a build output git ignores, so a PR that edits a .ts file without rebuilding it reads as correct and ships nothing. The Releasing section described `npm version && git push --follow-tags`, which tags whatever branch you are on. Every release since 0.3.0 has actually gone through a release/X.Y.Z PR with the tag on the merge commit, so it now says that, and says to let the workflow publish. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two release-time footguns, one of which has already cost a release its assets.
release.ymlis not idempotentPublishing a release from the GitHub UI creates its tag, and that tag push is what starts this workflow.
gh release createthen fails on a release that already exists — and it fails after the build and attestation steps, so what survives is a published release with nomain.jsattached. That's the one shape of release that is useless to Obsidian: the plugin won't load.The step now checks for the release and uploads onto it when it's there.
--clobberalso makes re-running a job that died partway through safe, rather than failing on whichever assets the first attempt managed to upload.Verified by extracting the step's shell body straight out of the YAML and running it against a stub
gh, in both states:CONTRIBUTING.mdmain.jsis a tracked artifact, not a build output git ignores. Obsidian loads the plugin from it and the release workflow attaches whatever the tag points at, so a PR that edits a.tsfile without rebuilding reads as correct and ships nothing. Nothing in CI catches this — the build job builds from source and never compares against the committed artifact.npm version patch && git push --follow-tags, which tags whatever branch you're on. Every release since 0.3.0 has actually gone through arelease/X.Y.ZPR with the tag on the merge commit (0.5.0→000c9c8, the merge of Release 0.5.0 #14). It now documents what the repo does, and says to let the workflow publish rather than creating the release by hand.🤖 Generated with Claude Code