go-template
go-template copied to clipboard
feat: add reproducible debian packaging with goreleaser & CI workflow
This pull request introduces comprehensive updates to the release workflow, packaging system, and reproducibility features for the project. Key changes include enhancements to the GitHub Actions workflow for releases, a new Makefile section for packaging, reproducible Debian packaging with GoReleaser, and systemd integration for the HTTP server. These changes aim to improve automation, ensure reproducible builds, and simplify deployment.
GitHub Actions Workflow Enhancements
- Added support for manual workflow dispatch with inputs for snapshot releases in
.github/workflows/release.yaml. - Updated the release job to include steps for running tests, lints, and reproducible builds, as well as uploading artifacts and testing package installation.
Packaging and Reproducibility
- Introduced reproducible Debian and RPM packaging using GoReleaser, including configuration for consistent metadata, file permissions, and checksums in
.goreleaser.yaml. - Added new
Makefiletargets for building, testing, and cleaning packages, as well as verifying reproducibility of builds.
Systemd Integration
- Added a systemd service file (
packaging/go-template-httpserver.service) for the HTTP server, with configuration for secure operation and logging. - Included a default configuration file (
packaging/go-template-httpserver.default) for customizable runtime parameters.
Post-Install and Cleanup Scripts
- Added post-install, pre-remove, and post-remove scripts for managing the HTTP server service and ensuring proper cleanup during package installation and removal. [1] [2] [3]
Documentation Updates
- Updated
README.mdwith instructions for reproducible Debian packaging, including prerequisites, build steps, and package contents.