@@ -131,8 +131,63 @@ jobs:
131131 cp "target/${{ matrix.target }}/release/wallhack" "$ARTIFACT"
132132 gh release upload --clobber "$TAG_NAME" "$ARTIFACT"
133133
134+ build-mcp :
135+ if : startsWith(github.event.inputs.tag_name, 'wallhack-cli-v')
136+ permissions :
137+ contents : write
138+ strategy :
139+ fail-fast : false
140+ matrix :
141+ target :
142+ - x86_64-unknown-linux-gnu
143+ - aarch64-unknown-linux-gnu
144+ include :
145+ - target : x86_64-unknown-linux-gnu
146+ artifact : wallhack-mcp-linux-x64
147+ - target : aarch64-unknown-linux-gnu
148+ artifact : wallhack-mcp-linux-arm64
149+ cross : true
150+
151+ runs-on : self-hosted
152+
153+ steps :
154+ - uses : actions/checkout@v6
155+ with :
156+ ref : ${{ github.event.inputs.tag_name }}
157+
158+ - name : Install Rust toolchain
159+ run : |
160+ rustup show
161+ rustup target add ${{ matrix.target }}
162+
163+ - name : Install cross
164+ if : matrix.cross
165+ env :
166+ GH_TOKEN : ${{ github.token }}
167+ run : |
168+ if ! command -v cross &>/dev/null; then
169+ gh release download "$CROSS_VERSION" --repo cross-rs/cross --pattern 'cross-x86_64-unknown-linux-musl.tar.gz' -D /tmp --clobber
170+ tar xz -C ~/.cargo/bin cross < /tmp/cross-x86_64-unknown-linux-musl.tar.gz
171+ fi
172+
173+ - name : Build (native)
174+ if : ${{ !matrix.cross }}
175+ run : cargo build --release --target ${{ matrix.target }} -p wallhack-mcp
176+
177+ - name : Build (cross)
178+ if : matrix.cross
179+ run : cross build --release --target ${{ matrix.target }} -p wallhack-mcp
180+
181+ - name : Upload binary
182+ env :
183+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
184+ TAG_NAME : ${{ github.event.inputs.tag_name }}
185+ run : |
186+ cp "target/${{ matrix.target }}/release/wallhack-mcp" "${{ matrix.artifact }}"
187+ gh release upload --clobber "$TAG_NAME" "${{ matrix.artifact }}"
188+
134189 publish :
135- needs : build
190+ needs : [ build, build-mcp]
136191 runs-on : self-hosted
137192 permissions :
138193 contents : write
0 commit comments