Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main steps to publish Elixir package #107

Merged
merged 1 commit into from
Jan 31, 2019
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
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Documentation](#documentation)
- [Testing](#testing)
- [Formatting](#formatting )
- [Publishing](#publishing)
- [Data Structures](#data-structures)
- [Maps](#maps)
- [Processes](#processes)
Expand Down Expand Up @@ -865,8 +866,36 @@ https://github.com/elixir-lang/elixir/blob/master/lib/mix/lib/mix/tasks/format.e
+ https://hashrocket.com/blog/posts/format-your-elixir-code-now
+ https://devonestes.herokuapp.com/everything-you-need-to-know-about-elixirs-new-formatter

## Publishing

To publish your Elixir package to [Hex.pm](https://hex.pm/):
- Check the version in `mix.exs` is up to date and that it follows the [sementic versioning format](https://semver.org/):
> MAJOR.MINOR.PATCH where
MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backwards-compatible manner
PATCH version when you make backwards-compatible bug fixes

- Check that the main properties of the project are defined in `mix.exs`
- name: The name of the package
- description: A short description of the package
- licenses: The names of the licenses of the package

- Make sure that [ex_doc](https://hex.pm/packages/ex_doc) is added as a dependency in you project
```
defp deps do
[
{:ex_doc, "~> 0.19.3", only: :dev}
]
end
```
When publishing a package the documentation will be automatically generated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add something about a user making sure to document their functions. Could link to the documentation section of the learn elixir readme. No way a blocker though. Just a thought 👍

So if the dependency ex_doc is not declared, the package won't be able to be published

- Run `mix hex.publish` and if all the information are correct reply `Y`

- Now that your package is published you can create a new git tag with the name of the version:
- `git tag -a 0.1.0 -m "my 0.1.0 release"`
- `git push --tags`

## Data Structures

Expand Down