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

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ replace an editor plugin (for example nvim's markdown-preview) with an external
process, so it works with any editor that can run a shell command, such as
Helix.

## Installation

With [cargo-binstall](https://github.com/cargo-bins/cargo-binstall), which
fetches the prebuilt binary for your platform instead of compiling:

```sh
cargo binstall mdpreviewer
```

Or build and install from [crates.io](https://crates.io/crates/mdpreviewer):

```sh
cargo install mdpreviewer
```

Binaries are published for macOS arm64 (`aarch64-apple-darwin`) and Linux x86_64
(`x86_64-unknown-linux-gnu`); `cargo install` covers everything else. The
archives are also on the
[releases page](https://github.com/jkellz-dev/mdpreviewer/releases) with a
`.sha256` beside each one, if you would rather unpack one yourself.

Either way, `mdpreviewer` has to land on the `PATH` your editor inherits. See
[Building from source](#building-from-source) to install from a clone instead.

## Usage

```sh
Expand Down Expand Up @@ -119,18 +143,9 @@ no matter how many times you press `\mm`. `--restart` replaces the process, so
it picks up both new assets and new server code. It binds a new port, so any tab
from the previous server stops updating; close it.

## Building and installing
## Building from source

Install the published binary with cargo:

```sh
cargo install mdpreviewer
```

Prebuilt macOS and Linux binaries are attached to each
[release](https://github.com/jkellz-dev/mdpreviewer/releases).

To build from a clone, this repo uses [mise](https://mise.jdx.dev/) for tasks:
This repo uses [mise](https://mise.jdx.dev/) for tasks:

```sh
mise run build # cargo build --release
Expand Down Expand Up @@ -174,6 +189,12 @@ x86_64 binaries.
Publishing needs a `CARGO_REGISTRY_TOKEN` repository secret holding a crates.io
token with the `publish-new` and `publish-update` scopes.

Release immutability has to stay off in the repository settings. release-plz
publishes the release first and the `binaries` job attaches the archives to it
a minute later, which an immutable release rejects with
`HTTP 422: Cannot upload assets to an immutable release`. Turning the setting
off only affects later releases; one already sealed stays sealed.

Before pushing, rehearse locally:

```sh
Expand Down
Loading
0