8000 fix release by jkellz-dev · Pull Request #9 · jkellz-dev/mdpreviewer · GitHub
[go: up one dir, main page]

Skip to content

fix release - #9

Merged
jkellz-dev merged 2 commits into
mainfrom
jkellz/fix_release
Sep 25, 2026
Merged

jkellz-dev merged 2 commits into
mainfrom
jkellz/fix_release

Conversation

@jkellz-dev
Copy link
Copy Markdown
Owner

What

Two README changes:

  1. docs(readme) - adds an ## Installation section at the top of the README, leading with cargo binstall and falling back to cargo install. The existing ## Building and installing section is narrowed to ## Building from source, so installation is no longer described in two places.
  2. fix(ci) - records in the ## Releasing section that release immutability must stay off on this repository.

Why

The README had no installation section. Installation instructions were buried two thirds of the way down under a heading about building, which is not where someone landing on the crate page looks.

The second commit documents the cause of a real release failure. Release immutability was switched on between v0.1.0 and v0.1.1. release.yml publishes the GitHub release via release-plz and then attaches the prebuilt archives from the binaries job about a minute later, which an immutable release rejects:

HTTP 422: Cannot upload assets to an immutable release.

Both binaries matrix jobs failed on the v0.1.1 run, so v0.1.1 shipped with no archives attached. The crate itself published to crates.io correctly and exactly once. The setting has been turned off, and this commit records the constraint next to the release instructions so it does not get switched back on.

Notes

  • Disabling immutability only affects releases created afterwards. v0.1.1 stays sealed and can never receive its binaries; v0.1.2 will be the first release to get them again.
  • cargo binstall needs no Cargo.toml metadata. The existing asset names (mdpreviewer-v{version}-{target}.tar.gz under releases/download/v{version}/) already match cargo-binstall's default URL and bin-dir patterns. Verified by resolving both v0.1.0 asset URLs (HTTP 200).
  • Until v0.1.2 ships, cargo binstall mdpreviewer will fall back to building from source, because v0.1.1 has no assets to fetch.
  • fix(ci) is used instead of a bare ci: on purpose: release-plz.toml skips ^(test|chore|ci|build|style), so a bare ci: commit would never reach the changelog.

Testing

  • mise run lint passes (rustfmt, clippy, rumdl, oxfmt, actionlint, zizmor, yamlfmt, taplo).
  • mise run release:preview confirms the next release is 0.1.2 with both commits categorised correctly:
### Documentation
- *(readme)* add an installation section for cargo and cargo-binstall

### Fixed
- *(ci)* attach release binaries again by disabling release immutability

No code changes, so no behaviour to test beyond the above.

Lead with cargo-binstall, which resolves the release archives with no
extra metadata because their names already match its default patterns.
Narrow the old "Building and installing" section to building from a
clone, so installing is not described in two places.
Release immutability was switched on between v0.1.0 and v0.1.1, so
release-plz published a sealed release and the binaries job could not
upload to it:

  HTTP 422: Cannot upload assets to an immutable release

v0.1.1 therefore shipped with no archives attached. The setting is now
off; record the constraint next to the release instructions so it does
not get switched back on.
@jkellz-dev
jkellz-dev merged commit 173741a into main Sep 25, 2026
3 checks passed
@jkellz-dev
jkellz-dev deleted the jkellz/fix_release branch September 25, 2026 22:48
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

0