Skip to content

Commit

Permalink
Update contributing.md with information about publishing to crates.io.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfachan committed Jan 22, 2024
1 parent 6888bed commit b2732d4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ These are the items we need to do to release:
- Update `version` in `[workspace.package]` in `Cargo.toml`.
- Commit above changes.
- Tag previous changeset with the version tag.
- Publish to crates.io.
- Update `version` in `[workspace.package]` in `Cargo.toml` to next dev version.
- Push changesets and tags.
- Create GitHub release.
Expand Down Expand Up @@ -77,6 +78,21 @@ like "`v1.2.3`".
git tag v1.2.3
```

## Publish to Crates.io

Packages are published to crates.io individually. Moreover, they have to be
published in the right order, such that all a package's depdendencies are
published before the package itself. We'll automate this at some point, but for
now:

```
for i in crates/{maelstrom-{base,plot,simex,test,worker-child,util,web,worker,broker,container,client,client-cli},cargo-maelstrom}; do (cd $i && cargo publish); done
```

To do this, you must have a secret stored in `~/.cargo/credentials.toml`, and
that secret must allow you to publish these crates. If that is not the case,
ask Neal for the secret and then run `cargo login`.

## Update `version` in `[workspace.package]` in `Cargo.toml` to Next Dev Version

This is a mechanical change. In the future, we will do this using a tool.
Expand Down

0 comments on commit b2732d4

Please sign in to comment.