File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 6969 - name : Build Go bindings
7070 run : |
7171 cd packages/go
72- $env:LD_LIBRARY_PATH = "$PWD/../../target/release;$env:LD_LIBRARY_PATH"
73- $env:DYLD_LIBRARY_PATH = "$PWD/../../target/release;$env:DYLD_LIBRARY_PATH"
72+ $ffiPath = "$PWD/../../target/release"
73+ if ($IsWindows) {
74+ $env:PATH = "$ffiPath;$env:PATH"
75+ $env:LIB = "$ffiPath;$env:LIB"
76+ $env:CGO_LDFLAGS = "-L$ffiPath"
77+ } else {
78+ $env:LD_LIBRARY_PATH = "$ffiPath;$env:LD_LIBRARY_PATH"
79+ $env:DYLD_LIBRARY_PATH = "$ffiPath;$env:DYLD_LIBRARY_PATH"
80+ }
7481 go build -v ./...
7582 shell : pwsh
7683
Original file line number Diff line number Diff line change @@ -86,11 +86,12 @@ jobs:
8686 pnpm install
8787 pnpm exec napi build --platform --release --target ${{ matrix.target }}
8888 mkdir -p artifacts
89- pnpm exec napi artifacts --output-dir ./artifacts
89+ # Collect artifacts from napi (if produced) and fallback to target outputs.
90+ pnpm exec napi artifacts --output-dir ./artifacts || true
9091 shopt -s nullglob globstar
91- artifacts=(artifacts/**/*.node)
92+ artifacts=(artifacts/**/*.node target/**/release/*.node )
9293 if [ "${#artifacts[@]}" -eq 0 ]; then
93- echo "No .node artifacts produced under artifacts/" >&2
94+ echo "No .node artifacts produced under artifacts/ or target/**/release " >&2
9495 exit 1
9596 fi
9697 cp "${artifacts[@]}" .
You can’t perform that action at this time.
0 commit comments