diff --git a/README.md b/README.md index eda83a6..3d8b919 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,61 @@ -# Repository Name +# semantic-release-hackage -Quick summary about the repository or library. What is +[semantic-release](https://semantic-release.gitbook.io/semantic-release/) plugin to publish a haskell package to [Hackage](https://hackage.haskell.org/) -## How it works / motivation / purpose +## Motivation -Promote the library/project explaining how it works. You can also add the motiviation for writing the library or explain its porpuse in this section. +Semantic-release is widely used in the development world but have not been implemented for haskell projects and applications until now. This plugin is intended to help you creating your candidate releases for a hackage package using the benefits of semantic-release + +## Steps + +| Step | Description | +| ------------------ | ------------------------------------------------------------------------------ | +| `verifyConditions` | verify the environment variable `HACKAGE_TOKEN` | +| `prepare` | Update the version of `.cabal` file and create the distribution package (.tar) | +| `publish` | Publish the hackage package to the specified repository | + +## Environment variables + +| Variable | Description | Required | +| --------------- | -------------------------------------------------------------- | -------- | +| `HACKAGE_TOKEN` | [API token](https://hackage.haskell.org/packages/) for hackage | true | ## Install -Its a good idea to explain/show how to install the library/project. You can try to use badges of the package registry (NPM, MyPy, Stackage, Maven, etc) to always display the latest version so this section is easier to maintain. +With npm: + +```sh +npm install semantic-release-hackage -D +``` + +With yarn: + +```sh +yarn add semantic-release-hackage --dev +``` ## Usage -This section can show a quick start of the library/project. This helps developers quickly understand how the software is expected to be used, giving a great entry point to project as well. In this section you can also write the documentation for the end-user, or add a link to the docs if they are in some external source (the wiki, a dedicated page, the `docs/` folder, etc.). +The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration). Here is a minimal example: - +```json +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "semantic-release-hackage" + ] +} +``` -## License +## Configuration + +| Property | Description | Default | +| ------------- | ----------------------- | --------------------------------------------- | +| `cabalFile` | Cabal file name | Plugin will read your root `.cabal` file name | +| `packageName` | Package name in Hackage | | - +## License MIT, see [the LICENSE file](LICENSE). @@ -27,6 +64,6 @@ MIT, see [the LICENSE file](LICENSE). Do you want to contribute to this project? Please take a look at our [contributing guideline](/docs/CONTRIBUTING.md) to know how you can help us build it. --- + Stack Builders [Check out our libraries](https://github.com/stackbuilders/) | [Join our team](https://www.stackbuilders.com/join-us/) -