Add release workflow + fix module path#7
Merged
Conversation
* `.github/workflows/release.yml`: on `v*` tag push, cross-compile via `make dist` (CGO_ENABLED=0), generate SHA256SUMS, publish a pre-release with auto-generated notes via softprops/action-gh-release. * `go.mod`/`go.sum`: project was pre-modules; add a clean module file so the workflow (and `go install`) build reproducibly. * `cmd/hydrate/main.go`: switch import from `github.com/pressly/hydrate` to `github.com/vcilabs/hydrate`. Without this, `go install` and any module-aware build pull the upstream package and silently drop fork changes (e.g. DE-2923 array hydration). Existing v0.0.5 release was built locally with a `replace` directive workaround; this change removes the need for one going forward.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR migrates the project to Go modules and adds an automated GitHub Actions release pipeline so tagged releases can be built and published consistently from CI, while also fixing the CLI to import the fork’s module path.
Changes:
- Added
go.mod/go.sumto support module-aware builds (go install, CI builds, dependency pinning). - Updated
cmd/hydrate/main.goto importgithub.com/vcilabs/hydrateinstead of the upstreampresslymodule path. - Added
.github/workflows/release.ymlto build cross-compiled binaries onv*tag pushes, generate SHA256 checksums, and publish a pre-release with assets.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
go.mod |
Defines the module path (github.com/vcilabs/hydrate), Go version, and direct/indirect dependencies. |
go.sum |
Adds dependency checksums for reproducible module downloads/builds. |
cmd/hydrate/main.go |
Switches the CLI to import the fork module path to avoid silently pulling upstream under modules. |
.github/workflows/release.yml |
Implements tag-triggered cross-compilation, checksum generation, and GitHub release publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
suraj-swaroop-alida
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/release.ymlso futurev*tag pushes auto-build cross-compiled binaries and publish them as a GitHub release (matches what the existingMakefiledisttarget produces).go.mod/go.sum— the project was pre-modules, which brokego installand made the workflow impossible without scaffolding.cmd/hydrate/main.goimport:github.com/pressly/hydrate→github.com/vcilabs/hydrate. Without this fix, module-aware builds silently pull the upstreampresslypackage and drop fork changes (e.g. DE-2923 array hydration).The v0.0.5 release that was just published was built locally with a
replace github.com/pressly/hydrate => ./workaround. After this PR lands and a new tag is pushed (or v0.0.5 is re-tagged), no workaround is needed.Workflow behavior
pushof anyv*tagCGO_ENABLED=0 make dist→ 5 binaries (darwin64, linux64, linux386, windows64, windows386)sha256sum hydrate-* > SHA256SUMSsoftprops/action-gh-release@v2withprerelease: true(matching v0.0.1–v0.0.5 pattern) andgenerate_release_notes: truecontents: writeonlyTest plan
masterv0.0.5-rc1) to confirm the workflow runs end-to-end and produces a draft pre-release with all 6 assets