Skip to content

Commit 1e15378

Browse files
committed
docs: add comprehensive README with project documentation
The README includes: - Project overview and purpose as a supplemental library for Hedgehog - Installation instructions for package.yaml and .cabal files - Detailed release workflow documentation covering both automatic and manual tagging processes - CI/CD pipeline integration with GitHub Actions - Hackage candidate upload and publication process - Build status badges for dependency tracking and CI status The release documentation is particularly comprehensive, explaining: - Automatic tag creation when version bumps are pushed to main - Manual tag creation process for direct control - Automated workflow steps including testing, validation, and Hackage candidate uploads - Post-workflow steps for reviewing and publishing candidates
1 parent 83bff83 commit 1e15378

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# hedgehog-extras
2+
3+
![Dependency Status](https://github.com/input-output-hk/hedgehog-extras/actions/workflows/cabal-outdated.yml/badge.svg)
4+
[![CI](https://github.com/input-output-hk/hedgehog-extras/actions/workflows/haskell.yml/badge.svg)](https://github.com/input-output-hk/hedgehog-extras/actions/workflows/haskell.yml)
5+
6+
Supplemental library for hedgehog.
7+
8+
## About
9+
10+
This library provides additional utilities and helpers for working with the [Hedgehog](https://hackage.haskell.org/package/hedgehog) property-based testing framework.
11+
12+
## Installation
13+
14+
Add to your `package.yaml` or `.cabal` file:
15+
16+
```yaml
17+
dependencies:
18+
- hedgehog-extras
19+
```
20+
21+
## Releasing
22+
23+
This project has a hybrid automated/manual release flow:
24+
25+
### Automatic Tagging (on main branch)
26+
27+
When you push a version bump to main, CI automatically creates a git tag:
28+
29+
1. Update `hedgehog-extras.cabal` and set `version:` to the new version
30+
2. Commit and push to main: `git commit -m "Bump version to X.Y.Z.W" && git push origin main`
31+
3. CI automatically creates and pushes tag `vX.Y.Z.W`
32+
4. The release workflow then runs automatically
33+
34+
### Manual Tagging
35+
36+
Alternatively, you can manually create and push tags:
37+
38+
1. Update `hedgehog-extras.cabal` with the new version
39+
2. Commit changes: `git commit -m "Release X.Y.Z.W"`
40+
3. Create tag: `git tag -a vX.Y.Z.W -m "Release version X.Y.Z.W"`
41+
4. Push both: `git push origin main && git push origin vX.Y.Z.W`
42+
43+
### What Happens Automatically
44+
45+
When a tag is pushed (either automatically or manually), GitHub Actions:
46+
- Runs the full test suite across all platforms and GHC versions
47+
- Validates the cabal project with `cabal check`
48+
- Creates source distributions (`cabal v2-sdist`)
49+
- **Uploads to Hackage as a candidate** (requires `HACKAGE_USER` and `HACKAGE_PASS` secrets)
50+
- Generates release notes from git commit history
51+
- Creates a GitHub Release
52+
53+
### Publishing the Hackage Candidate
54+
55+
After the workflow completes:
56+
1. Check the candidate at https://hackage.haskell.org/package/hedgehog-extras/candidates
57+
2. Test the candidate package
58+
3. When ready, publish it from the Hackage candidate page
59+
60+
### Notes
61+
62+
- The workflow is defined in `.github/workflows/haskell.yml`
63+
- Packages are uploaded as **candidates**, not published releases
64+
- Release notes are auto-generated from git commits since the last tag
65+
- The workflow requires `HACKAGE_USER` and `HACKAGE_PASS` repository secrets
66+
- Workflow requires `contents: write` permission (already configured)
67+
68+
## License
69+
70+
Copyright 2025 Input Output (Hong Kong) Ltd.
71+
72+
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)