Fix release workflow uploading no assets due to build output path mismatch (#13)#14
Merged
Merged
Conversation
…match (#13) The build step wrote binaries to `../build/` (parent of the workspace) while the packaging step copied from `./build/` (inside the workspace), so `./release/` ended up empty and the upload step attached no assets to the GitHub release. Point both the mkdir and the OUTPUT_PATH to `./build/` so the binary lives where the packaging step looks for it. Mirror the same correction in commit.yaml to keep both workflows consistent.
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.
Linked Issue
Closes #13
Root Cause
The release CI workflow had two steps using inconsistent paths:
../build/<name>(one directory above the GitHub Actions workspace) whilemkdir -p bincreated an unused./bin/. Note thatgo build -oauto-creates any missing parent directory, so this step succeeded without complaining.cp ./build/<name>-* ./release/against the./build/directory inside the workspace — which did not exist, because the binary was actually written to../build/.As a result,
./release/was empty when thesvenstaro/upload-release-actionstep ran, and every release tag was published with zero attached binaries. Confirmed remotely:gh release view v1.0.0 --json assets --jq '.assets | length'returns0.commit.yamlhad the same misalignment, though it did not publish anywhere.Fix Description
Make the build step write to
./build/(inside the workspace) and ensure the directory exists withmkdir -p ./build. The "Prepare Release Assets" step already reads from./build/, so the two are now consistent and the upload step receives the produced binaries. Apply the same correction tocommit.yamlfor parity.How Verified
Static: the build OUTPUT_PATH (
./build/...) and the packaging source path (./build/...) now agree.go build -o ./build/<name>writes the binary,cp ./build/<name>-* ./release/copies it, and the upload step uploads./release/<name>-*. Verified remotely that the v1.0.0 release currently has 0 assets, which is the symptom of the bug.Runtime: end-to-end confirmation requires publishing a new release; the workflow is otherwise unchanged.
Test Coverage
None: CI workflow changes; verification will come from the next release tag. The deterministic nature of the path correction (one constant string per file) makes a test unnecessary.
Scope of Change
.github/workflows/release.yaml,.github/workflows/commit.yamlRisk and Rollout
No source-code change; only CI configuration. Worst case if something else breaks: next release still has no assets (current state). The change is otherwise a strict improvement.