Skip to content

Conversation

@newhoggy
Copy link
Collaborator

@newhoggy newhoggy commented Oct 26, 2025

Description

This PR implements automated publishing workflow for Hackage packages with comprehensive validation and error handling to prevent duplicate uploads. The workflow enhancement enables automatic package deployment to Hackage as part of the CI pipeline, along with complete project documentation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Changes Made

  • Switched from curl-based uploads to native cabal upload command for more reliable Hackage publishing
  • Configured Hackage credentials via cabal config file instead of curl authentication
  • Added automatic version extraction from cabal files for validation
  • Implemented duplicate upload detection to prevent failures on existing packages
  • Merged separate publish job into release job for improved efficiency
  • Added write permissions for automated release creation
  • Switched to softprops/action-gh-release for more robust GitHub releases
  • Removed redundant artifact upload steps to streamline workflow
  • Added comprehensive README documentation including installation instructions, release workflow, and CI/CD pipeline details
  • Documented both automatic and manual tagging processes for releases

Testing

  • All existing tests pass
  • New tests added for new functionality
  • Manual testing performed

Additional Notes

The publishing workflow uses GitHub secrets for Hackage credentials (HACKAGE_USER and HACKAGE_PASS) which need to be configured in the repository settings. The workflow is currently configured to publish packages as candidates by default, which allows for testing before final release. The README now provides complete documentation on the release process, including automatic tag creation on version bumps and the Hackage candidate review process.

Implements comprehensive automated publishing to Hackage with proper
validation and error handling, while consolidating the CI/CD pipeline
for more efficient releases.

Publishing improvements:
- Switch from curl-based uploads to native cabal upload command
- Configure credentials via cabal config file instead of curl auth
- Add automatic version extraction from cabal file
- Implement duplicate upload detection to prevent failures
- Support both candidate and production publishing modes

Release workflow enhancements:
- Merge separate publish job into release job for efficiency
- Add write permissions for automated release creation
- Support both tag-based and manual release triggers
- Switch to softprops/action-gh-release for robust releases
- Remove redundant artifact upload steps

Configuration changes:
- Add HACKAGE_USERNAME and HACKAGE_PASSWORD secret configuration
- Install Haskell toolchain in release job for cabal commands

This change significantly simplifies the deployment pipeline while
adding proper error handling and validation to prevent common
publishing issues like duplicate uploads or missing credentials.
@newhoggy newhoggy force-pushed the newhoggy/add-ability-to-publish-from-ci branch from b89c092 to 835a886 Compare October 26, 2025 14:01
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
@newhoggy newhoggy deployed to cabal-cache October 26, 2025 14:04 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant