Skip to content

Commit

Permalink
Merge pull request #617 from axodotdev/extra-artifacts-docs
Browse files Browse the repository at this point in the history
docs: document extra artifacts
  • Loading branch information
mistydemeo authored Dec 19, 2023
2 parents 09a9770 + ca2aaf5 commit 8234aa4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion book/src/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,26 @@ Example: `dist = false`
Specifies whether cargo-dist should ignore this package. It primarily exists as an alternative for `publish=false` or an override for `publish=false`.


### extra-artifacts

> since 0.6.0
Example:

```toml
[[workspace.metadata.dist.extra-artifacts]]
artifacts = ["dist-manifest-schema.json"]
build = ["cargo", "dist", "manifest-schema", "--output=dist-manifest-schema.json"]
```

Allows building extra artifacts to upload to your releases. Users can download these directly alongside artifacts like release tarballs or installers. To enable this feature, create an `extra-artifacts` array on your workspace or package configuration. This takes two keys:

* `build`: A command or script to run to produce these artifacts. This is an array of one or more strings; the first string is the command cargo-dist will run, and any subsequent strings are arguments to pass to that command.
* `artifacts`: An array of artifacts that cargo-dist expects to exist after the `build` command is run. Every artifact in this list will be uploaded individually to your release.

cargo-dist uses this feature to distribute its `dist-manifest-schema.json`.


### fail-fast

> since 0.1.0
Expand Down Expand Up @@ -552,4 +572,4 @@ Caveat: the default "host" Artifact Mode does something fuzzier with `--target`
[rustup]: https://rust-lang.github.io/rustup/
[platforms]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
[scope]: https://docs.npmjs.com/cli/v9/using-npm/scope
[crt-static]: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md#future-work
[crt-static]: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md#future-work

0 comments on commit 8234aa4

Please sign in to comment.