{"id":21409829,"url":"https://github.com/stackbuilders/semantic-release-hackage","last_synced_at":"2025-07-22T22:02:34.871Z","repository":{"id":219356000,"uuid":"648786422","full_name":"stackbuilders/semantic-release-hackage","owner":"stackbuilders","description":"A sematic-release plugin to publish Haskell packages to Hackage","archived":false,"fork":false,"pushed_at":"2025-06-09T16:28:05.000Z","size":2200,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-06-09T17:33:21.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackbuilders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-02T20:10:42.000Z","updated_at":"2025-06-09T16:28:03.000Z","dependencies_parsed_at":"2024-02-14T15:47:37.311Z","dependency_job_id":"8563daa7-2792-422d-b5ee-b862e4d20529","html_url":"https://github.com/stackbuilders/semantic-release-hackage","commit_stats":null,"previous_names":["stackbuilders/semantic-release-hackage"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fsemantic-release-hackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fsemantic-release-hackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fsemantic-release-hackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fsemantic-release-hackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackbuilders","download_url":"https://codeload.github.com/stackbuilders/semantic-release-hackage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fsemantic-release-hackage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258926873,"owners_count":22779534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T17:34:31.835Z","updated_at":"2025-06-18T22:35:15.201Z","avatar_url":"https://github.com/stackbuilders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/stackbuilders/semantic-release-hackage/actions/workflows/ci.yml/badge.svg)](https://github.com/stackbuilders/semantic-release-hackage/actions/workflows/ci.yml)\n[![Release](https://github.com/stackbuilders/semantic-release-hackage/actions/workflows/release.yml/badge.svg)](https://github.com/stackbuilders/semantic-release-hackage/actions/workflows/release.yml)\n[![NPM version](https://img.shields.io/npm/v/semantic-release-hackage?logo=npm)](https://www.npmjs.com/package/semantic-release-hackage)\n[![NPM bundle size](https://img.shields.io/bundlephobia/min/semantic-release-hackage)](https://www.npmjs.com/package/semantic-release-hackage)\n[![NPM downloads](https://img.shields.io/npm/dm/semantic-release-hackage)](https://www.npmjs.com/package/semantic-release-hackage)\n[![NPM license](https://img.shields.io/npm/l/semantic-release-hackage)](https://github.com/stackbuilders/semantic-release-hackage/blob/main/LICENSE)\n[![GitHub Release Date](https://img.shields.io/github/release-date/stackbuilders/semantic-release-hackage)](https://github.com/stackbuilders/semantic-release-hackage/releases)\n[![Known Vulnerabilities](https://snyk.io/test/github/stackbuilders/semantic-release-hackage/badge.svg)](https://snyk.io/test/github/stackbuilders/semantic-release-hackage)\n\n# semantic-release-hackage\n\n[semantic-release](https://semantic-release.gitbook.io/semantic-release/) plugin to publish a haskell package to [Hackage](https://hackage.haskell.org/)\n\n## Motivation\n\nSemantic-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 create your candidate releases for a hackage package using the benefits of semantic-release\n\n## Steps\n\n| Step               | Description                                                                    |\n| ------------------ | ------------------------------------------------------------------------------ |\n| `verifyConditions` | verify the environment variable `HACKAGE_TOKEN`                                |\n| `prepare`          | Update the version of `.cabal` file and create the distribution package (.tar) |\n| `publish`          | Publish the hackage package to the specified repository                        |\n\n## Environment variables\n\n| Variable        | Description                                                    | Required |\n| --------------- | -------------------------------------------------------------- | -------- |\n| `HACKAGE_TOKEN` | [API token](https://hackage.haskell.org/packages/) for hackage | true     |\n\n## Install\n\nWith npm:\n\n```sh\nnpm install semantic-release-hackage -D\n```\n\nWith yarn:\n\n```sh\nyarn add semantic-release-hackage --dev\n```\n\n## Usage\n\nThe 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:\n\n```json\n{\n  \"plugins\": [\n    \"@semantic-release/commit-analyzer\",\n    \"@semantic-release/release-notes-generator\",\n    [\n      \"semantic-release-hackage\",\n      {\n        \"cabalFile\": \"yourcabalfilename\",\n        \"packageName\": \"yourpackagename\",\n        \"versionPrefix\": \"0.\",\n        \"publishDocumentation\": true\n      }\n    ]\n  ]\n}\n```\n\n### Development\nBased on the semantic-release philosophy, you don't need to keep track of the version in your repository (.cabal) anymore. The plugin will build the package with the proper version on the fly, making it simpler for you to maintain your packages. In simpler words, you can change your `.cabal` file to the following:\n\n```cabal\n  ...\n  version: 0.0.0.0\n  ...\n```\n\n__Note: Your Hackage release candidate is going to have the released version in the .cabal file.__\n\n\u003e If you still want to keep track of the version in the repository, you'll need to allow semantic-release to update your .cabal file in your repository after the semantic-release-hackage plugin finishes. This can be achieved with the [@semantic-release/git plugin](https://github.com/semantic-release/git), but keep in mind that semantic-release explicitly [discourages making commits during your release process](https://semantic-release.gitbook.io/semantic-release/support/faq#making-commits-during-the-release-process-adds-significant-complexity).\n\n## Configuration\n\n### _packageName_\n\nRequired: `true`\n\nDescription: Package name in Hackage.\n\n### _cabalFile_\n\nRequired: `false`\n\nDescription: Library cabal file name.\n\nDefault: The plugin will read your root `.cabal` file name.\n\n### _publishDocumentation_\n\nRequired: `false`\n\nDescription: Boolean value used for publishing release candidate documentation. When `true` the plugin will publish the documentation along with the candidate release.\n\nDefault: `false`\n\n### _versionPrefix_\n\nRequired: `false`\n\nDescription: This is a version prefix created for supporting PVP versioning.\n\nDefault: `\"\"`\n\n### Why adding a `versionPrefix` configuration?\n\n[PVP](https://pvp.haskell.org/) is the standard versioning system for Haskell projects which is different from [Semantic Versioning](https://semver.org/). You may think that since this is a `semantic-release` plugin, you'll have to move out from PVP. But thanks to the `versionPrefix` option, you can keep the 4th digit in your version.\n\nThis is an optional feature enabling PVP compatibility when using this plugin. So, if your package uses PVP, `versionPrefix` can save the day, and you can continue using PVP versioning with this amazing tool.\n\nKeep in mind that using Semantic Versioning does make things simpler while following another well-known standard.\n\nFor example, if you have the version number `0.2.0.7` and want to create a new release for a new feature, semantic-release is going to infer the next version as `2.1.0`, you can keep your previous versioning by adding the following to the plugin configuration:\n\n```\n\"versionPrefix\" : \"0.\"\n```\n\nThe plugin will add the `0.` prefix to the new version, so your final version will be `0.2.1.0`.\n\n## License\n\nMIT, see [the LICENSE file](LICENSE).\n\n## Contributing\n\nDo 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.\n\n---\n\n\u003cimg src=\"https://www.stackbuilders.com/media/images/Sb-supports.original.png\" alt=\"Stack Builders\" width=\"50%\"\u003e\u003c/img\u003e  \n[Check out our libraries](https://github.com/stackbuilders/) | [Join our team](https://www.stackbuilders.com/join-us/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Fsemantic-release-hackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackbuilders%2Fsemantic-release-hackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Fsemantic-release-hackage/lists"}