# Expublish

Automate elixir package version and changelog management.

The new publish task guarantees:

- A clean git working directory
- Passing tests
- Increased version in mix.exs
- New changelog entry
- Commit, tag and git push
- Hex publish

<span id="#install"></span>
## How to install

Add `:expublish` to your dev dependencies in `mix.exs`:

{:expublish, "~> 1.1", only: [:dev]}

Create a `` in the root folder of your project. It must contain a placeholder:

<!-- %% CHANGELOG_ENTRIES %% -->

<span id="#how-to-use"></span>
## How to use

Create a `` containing the new changelog entry.  

$ echo "- changelog entry one\n- changelog entry two" >

Run one of `mix publish.(major|minor|patch)`.

$ mix publish.minor

<span id="#reference"></span>
## Reference

Usage: mix publish.[level] [options]

  major   - Publish new major version
  minor   - Publish new minor version
  patch   - Publish new patch version

  -d, --dry-run       - Dry run (no writes, no commits)
  --branch=string     - Remote branch to push to, default: "master"
  --remote=string     - Remote name to push to, default: "origin"
  --skip-publish      - Disable hex publish
  --skip-push         - Disable git push
  --skip-test         - Disable test run