@@ -53,23 +53,36 @@ jobs:
5353 if : ${{ matrix.source-build }}
5454 run : |
5555 set -euo pipefail
56- swift build --product WaxCLI --traits MCPServer --configuration release --triple "${{ matrix.triple }}"
57- BIN_PATH="$(swift build --product WaxCLI --traits MCPServer --configuration release --triple "${{ matrix.triple }}" --show-bin-path)"
58- mkdir -p npm/waxmcp/dist/${{ matrix.platform }}
59- cp "$BIN_PATH/WaxCLI" npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI
60- chmod +x npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI
56+ ./Scripts/build-waxmcp-binaries.sh "${{ matrix.platform }}" "${{ matrix.triple }}"
6157
6258 - name : Reuse checked-in x64 binary
6359 if : ${{ !matrix.source-build }}
6460 run : |
6561 set -euo pipefail
66- test -f npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI
67- chmod +x npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI
62+ ./Scripts/build-waxmcp-binaries.sh "${{ matrix.platform }}"
63+
64+ - name : Verify packaged binary
65+ run : |
66+ set -euo pipefail
67+ PLATFORM_DIR="npm/waxmcp/dist/${{ matrix.platform }}"
68+ test -f "$PLATFORM_DIR/WaxCLI"
69+ test -f "$PLATFORM_DIR/WaxCLI.sha256"
70+ if command -v shasum >/dev/null 2>&1; then
71+ shasum -a 256 -c "$PLATFORM_DIR/WaxCLI.sha256"
72+ else
73+ sha256sum -c "$PLATFORM_DIR/WaxCLI.sha256"
74+ fi
75+
76+ - name : Smoke check MCP CLI entrypoint
77+ if : ${{ matrix.source-build }}
78+ run : |
79+ set -euo pipefail
80+ npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI mcp serve --help
6881
6982 - uses : actions/upload-artifact@v4
7083 with :
7184 name : waxmcp-${{ matrix.platform }}
72- path : npm/waxmcp/dist/${{ matrix.platform }}/WaxCLI
85+ path : npm/waxmcp/dist/${{ matrix.platform }}
7386 if-no-files-found : error
7487
7588 publish :
@@ -109,11 +122,23 @@ jobs:
109122
110123 - name : Verify packaged binaries
111124 run : |
125+ set -euo pipefail
112126 chmod +x npm/waxmcp/dist/darwin-arm64/WaxCLI
113127 test -x npm/waxmcp/dist/darwin-arm64/WaxCLI
114128 chmod +x npm/waxmcp/dist/darwin-x64/WaxCLI
115129 test -x npm/waxmcp/dist/darwin-x64/WaxCLI
116130
131+ - name : Verify package integrity
132+ run : |
133+ set -euo pipefail
134+ if command -v shasum >/dev/null 2>&1; then
135+ shasum -a 256 -c "npm/waxmcp/dist/darwin-arm64/WaxCLI.sha256"
136+ shasum -a 256 -c "npm/waxmcp/dist/darwin-x64/WaxCLI.sha256"
137+ else
138+ sha256sum -c "npm/waxmcp/dist/darwin-arm64/WaxCLI.sha256"
139+ sha256sum -c "npm/waxmcp/dist/darwin-x64/WaxCLI.sha256"
140+ fi
141+
117142 - name : Verify version consistency
118143 run : |
119144 set -euo pipefail
0 commit comments