Skip to content

Commit fc407b0

Browse files
committed
fix(ci): stage sqlshield-lsp binary outside workspace dir for tarball
1 parent b46ba38 commit fc407b0

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/lsp-release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,19 @@ jobs:
5959
- name: Package
6060
shell: bash
6161
run: |
62-
mkdir -p dist
62+
mkdir -p dist _stage
6363
target=${{ matrix.target.rust }}
64+
# Stage in a dedicated directory: the repo root already
65+
# contains a `sqlshield-lsp/` directory (workspace member),
66+
# so a bare `cp` would copy *into* that directory and tar
67+
# would archive the whole crate instead of just the binary.
6468
if [[ "${{ runner.os }}" == "Windows" ]]; then
65-
cp target/$target/release/sqlshield-lsp.exe sqlshield-lsp.exe
66-
7z a -tzip dist/sqlshield-lsp-$target.zip sqlshield-lsp.exe
69+
cp target/$target/release/sqlshield-lsp.exe _stage/sqlshield-lsp.exe
70+
7z a -tzip dist/sqlshield-lsp-$target.zip ./_stage/sqlshield-lsp.exe
6771
else
68-
cp target/$target/release/sqlshield-lsp sqlshield-lsp
69-
chmod +x sqlshield-lsp
70-
tar -czf dist/sqlshield-lsp-$target.tar.gz sqlshield-lsp
72+
cp target/$target/release/sqlshield-lsp _stage/sqlshield-lsp
73+
chmod +x _stage/sqlshield-lsp
74+
tar -C _stage -czf dist/sqlshield-lsp-$target.tar.gz sqlshield-lsp
7175
fi
7276
7377
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)