Skip to content

Add release workflow + fix module path#7

Merged
suraj-swaroop-alida merged 1 commit into
masterfrom
imran/add-release-workflow
May 21, 2026
Merged

Add release workflow + fix module path#7
suraj-swaroop-alida merged 1 commit into
masterfrom
imran/add-release-workflow

Conversation

@imran-charania-alida
Copy link
Copy Markdown
Contributor

Summary

  • Add .github/workflows/release.yml so future v* tag pushes auto-build cross-compiled binaries and publish them as a GitHub release (matches what the existing Makefile dist target produces).
  • Add go.mod / go.sum — the project was pre-modules, which broke go install and made the workflow impossible without scaffolding.
  • Fix cmd/hydrate/main.go import: github.com/pressly/hydrategithub.com/vcilabs/hydrate. Without this fix, module-aware builds silently pull the upstream pressly package 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

  • Trigger: push of any v* tag
  • Build: CGO_ENABLED=0 make dist → 5 binaries (darwin64, linux64, linux386, windows64, windows386)
  • Checksums: sha256sum hydrate-* > SHA256SUMS
  • Publish: softprops/action-gh-release@v2 with prerelease: true (matching v0.0.1–v0.0.5 pattern) and generate_release_notes: true
  • Permissions: contents: write only

Test plan

  • Merge to master
  • Push a throwaway tag (e.g. v0.0.5-rc1) to confirm the workflow runs end-to-end and produces a draft pre-release with all 6 assets
  • Delete the throwaway tag/release once verified
  • Going forward, releases only need a tag push — no local builds

* `.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.
Copilot AI review requested due to automatic review settings May 21, 2026 16:50
@alidabot-dev
Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sum to support module-aware builds (go install, CI builds, dependency pinning).
  • Updated cmd/hydrate/main.go to import github.com/vcilabs/hydrate instead of the upstream pressly module path.
  • Added .github/workflows/release.yml to build cross-compiled binaries on v* 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.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
@suraj-swaroop-alida suraj-swaroop-alida merged commit 6401f8c into master May 21, 2026
2 checks passed
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.

4 participants