# `mix release.publish`
[🔗](https://gitlab.com/clschnei/phoenix_image/blob/v0.1.0/lib/mix/tasks/release.publish.ex#L1)

Automates a library release for Hex.

Steps:

1. Ensure git worktree is clean.
2. Run `mix precommit` (unless `--skip-precommit`).
3. Read version from `mix.exs` and derive tag `v<version>`.
4. Ensure tag does not already exist.
5. Create annotated tag.
6. Optionally push commit + tag.
7. Optionally publish package/docs to Hex.

## Options

  * `--remote <name>` - git remote to push to (default: `origin`)
  * `--message <msg>` - tag annotation message (default: `Release v<version>`)
  * `--no-tag` - skip tag creation
  * `--no-push` - skip git push
  * `--no-publish` - skip `mix hex.publish`
  * `--skip-precommit` - skip `mix precommit`
  * `--yes` - pass `--yes` to `mix hex.publish`

## Examples

    mix release.publish --yes
    mix release.publish --no-publish
    mix release.publish --no-tag --no-push --yes

---

*Consult [api-reference.md](api-reference.md) for complete listing*
