ci(publish): attach relayfile-mount binaries to releases#51
Conversation
The Publish Package workflow only attaches relayfile-cli-* to the GitHub
release — relayfile-mount has been silently missing from release assets
since v0.1.13. Downstream consumers (notably the cloud Daytona snapshot,
.github/workflows/rebuild-snapshot.yml in AgentWorkforce/cloud) still
pull relayfile-mount-linux-amd64 from v0.1.6 because that's the last
tag that actually ships it.
Add a `build-mount-binaries` job with a 4-platform matrix
(linux/darwin × amd64/arm64). Each matrix entry cross-compiles
`./cmd/relayfile-mount` with CGO_ENABLED=0, stamps the release version
into `main.version`, runs a sanity-size check, smoke-tests the native
binary on its matching runner, and uploads the result as an artifact.
`create-release` now depends on `build-mount-binaries`, downloads the
artifacts via a `relayfile-mount-*` pattern, verifies all four platforms
are present, and passes both binary sets to softprops/action-gh-release
so the release picks up `relayfile-mount-{linux,darwin}-{amd64,arm64}`
alongside the existing `relayfile-cli-*` assets.
After this lands, the next tagged release can be consumed directly by
the cloud snapshot rebuild (and a follow-up cloud PR will bump the
pinned version from v0.1.6 to the new tag).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a384d0576
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if: | | ||
| (matrix.goos == 'linux' && matrix.goarch == 'amd64') || | ||
| (matrix.goos == 'darwin' && matrix.goarch == 'arm64') | ||
| run: ./relayfile-mount-${{ matrix.suffix }} --help | head -20 |
There was a problem hiding this comment.
Fail smoke-test when relayfile-mount exits nonzero
The smoke-test command pipes ./relayfile-mount-... --help into head -20 without enabling pipefail, so the step can report success even when the binary fails to execute (for example, wrong architecture or a broken build). In GitHub Actions' default bash mode, the pipeline exit status comes from head, which masks failures from the binary and defeats the purpose of this validation gate.
Useful? React with 👍 / 👎.
| set -euo pipefail | ||
| OUT="relayfile-mount-${{ matrix.suffix }}" | ||
| go build \ | ||
| -ldflags="-s -w -X main.version=v${VERSION}" \ |
There was a problem hiding this comment.
🟡 -X main.version linker flag targets a non-existent variable, so version is never embedded
The build step uses -ldflags="-s -w -X main.version=v${VERSION}" to stamp the version into the binary, but there is no var version string (or any variable named version) declared anywhere in the cmd/relayfile-mount package (cmd/relayfile-mount/main.go:1-389, cmd/relayfile-mount/fuse_mount.go:1-57). The Go linker silently ignores -X flags that reference non-existent variables, so the build succeeds but the version string is never embedded. The existing Makefile:9 also only uses -s -w without -X, confirming this variable was never declared. A var version string declaration needs to be added to cmd/relayfile-mount/main.go for the version stamping to take effect.
Prompt for agents
The go build command at .github/workflows/publish.yml:234-235 uses -ldflags with -X main.version=v${VERSION} to stamp the version into the relayfile-mount binary. However, no var version string exists in the cmd/relayfile-mount package (main.go, fuse_mount.go). The Go linker silently ignores -X flags targeting non-existent variables, so the version is never embedded.
To fix: add var version string at package level in cmd/relayfile-mount/main.go (e.g. after the const block around line 28). Optionally, also wire it into the flag.Usage output or add a --version flag so users can query the embedded version.
Was this helpful? React with 👍 or 👎 to provide feedback.
With this PR teaching `publish.yml` to build and attach relayfile-mount binaries, the two remaining release workflows are fully superseded: - `release.yml` (Makefile-driven, fires on `push: tags: v*`) — has never run. Every tag since v0.1.6 has been created by `publish.yml` using GITHUB_TOKEN, which by design cannot trigger downstream workflows. Zero runs in history. - `release-binary.yml` (builds `./cmd/relayfile` on every push to main, cuts `build-<sha>` prereleases) — last successful prerelease was `build-e4eab60` in February 2026. Everything since has cancelled itself via its own concurrency group. Nothing downstream pins the `build-<sha>` prereleases. `publish.yml` is now the single source of truth for any release artifact anything consumes. Delete the dead siblings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Expanded scope per discussion: also deletes the two now-dead release workflows.
|
Problem
The
Publish Packageworkflow (publish.yml) only attachesrelayfile-cli-*to the GitHub release.relayfile-mounthas been silently missing from release assets since v0.1.13 — the last tag that shipped it is v0.1.6.relayfile-cli-*relayfile-mount-*Downstream impact: AgentWorkforce/cloud's
.github/workflows/rebuild-snapshot.yml:43still `curl`s `relayfile-mount-linux-amd64` from `v0.1.6` because that's the last tag that has it. The fix in relayfile#50 (preserve local files on write-denied) can't propagate into cloud snapshots until a released tag contains the updated binary.Change
New
build-mount-binariesjob inpublish.ymlwith a 4-platform matrix:Each matrix entry:
go.modversion../cmd/relayfile-mountwithCGO_ENABLED=0and stamps the release version intomain.version.create-releasedepends onbuild-mount-binaries, downloads the artifacts via arelayfile-mount-*pattern withmerge-multiple: true, verifies all four platforms are present and executable, and passes both globs tosoftprops/action-gh-release:The release body now documents the mount binaries and shows a pin-by-tag `curl` snippet. The `summary` job picks up the new stage.
Verification
python3 -c 'import yaml; yaml.safe_load(open(\".github/workflows/publish.yml\"))'→ OK.CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./cmd/relayfile-mount→ 7.25 MB binary.CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build ./cmd/relayfile-mount→ 6.79 MB binary, `--help` output matches the existing CLI.Follow-up
After this lands and the next tagged release ships, cloud's
rebuild-snapshot.ymlpins will be bumped fromv0.1.6to the new tag in a separate PR. Tracked in my queue.🤖 Generated with Claude Code