Skip to content

Commit fd609ae

Browse files
authored
Fix binary location for workspace builds (#41)
* debug: add file listing to diagnose binary location * fix: use workspace target directory instead of cli/target Cargo workspaces place binaries in the workspace root's target/ directory, not in cli/target/. This fixes binary preparation to look in the correct location.
1 parent dd4ea4d commit fd609ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/publish-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ jobs:
113113
- name: Prepare binary
114114
shell: bash
115115
run: |
116-
# Find the binary (it should be in cli/target/<target>/release)
117-
BINARY_PATH=$(find cli/target -type f -name "${{ matrix.artifact_name }}" | grep -E "/${{ matrix.target }}/release/${{ matrix.artifact_name }}$" | head -1)
116+
# In a Cargo workspace, binaries are in target/<target>/release, not cli/target
117+
BINARY_PATH=$(find target -type f -name "${{ matrix.artifact_name }}" | grep -E "/${{ matrix.target }}/release/${{ matrix.artifact_name }}$" | head -1)
118118
119119
if [ -z "$BINARY_PATH" ]; then
120120
echo "ERROR: Binary not found!"
121-
find cli/target -type f -name "${{ matrix.artifact_name }}" || echo "No binaries found at all"
121+
find target -type f -name "${{ matrix.artifact_name }}" || echo "No binaries found at all"
122122
exit 1
123123
fi
124124

.github/workflows/release-cli.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ jobs:
9494
- name: Prepare binary
9595
shell: bash
9696
run: |
97-
# Find the binary (it should be in cli/target/<target>/release)
98-
BINARY_PATH=$(find cli/target -type f -name "${{ matrix.artifact_name }}" | grep -E "/${{ matrix.target }}/release/${{ matrix.artifact_name }}$" | head -1)
97+
# In a Cargo workspace, binaries are in target/<target>/release, not cli/target
98+
BINARY_PATH=$(find target -type f -name "${{ matrix.artifact_name }}" | grep -E "/${{ matrix.target }}/release/${{ matrix.artifact_name }}$" | head -1)
9999
100100
if [ -z "$BINARY_PATH" ]; then
101101
echo "ERROR: Binary not found!"
102-
find cli/target -type f -name "${{ matrix.artifact_name }}" || echo "No binaries found at all"
102+
find target -type f -name "${{ matrix.artifact_name }}" || echo "No binaries found at all"
103103
exit 1
104104
fi
105105

0 commit comments

Comments
 (0)