-
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (51 loc) · 2.17 KB
/
Copy pathaction.yml
File metadata and controls
51 lines (51 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Build shaft-mcp Live Launcher Jar'
description: >-
Sets up JDK 25, builds a runnable shaft-mcp jar plus its runtime
dependencies, and writes a `java @argsfile` launcher for it (same recipe as
guided-workflows-live.yml, with -DheadlessExecution=true added to the
argsfile so the spawned MCP server process runs headless -- Web.java's
"system:properties" @Sources entry wins inside that process). Exports
MCP_JAVA (java executable) and MCP_ARGS (path to the argsfile) as job
environment variables so callers pass
"-D<gate>.liveMcpCommand=${MCP_JAVA} @${MCP_ARGS}" to a live test run.
Callers needing other reactor modules built (e.g. shaft-cli) must install
them separately -- this action only builds shaft-mcp.
runs:
using: 'composite'
steps:
- name: Set up JDK 25 (shaft-mcp runtime)
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'zulu'
check-latest: true
- name: Build shaft-mcp with dependencies
shell: bash
run: |
for attempt in 1 2 3; do
if {
mvn --batch-mode -pl shaft-mcp -am install -DskipTests -Dgpg.skip \
&& mvn --batch-mode -pl shaft-mcp dependency:copy-dependencies -DincludeScope=runtime '-DoutputDirectory=${maven.multiModuleProjectDirectory}/shaft-mcp/target/dependency' -DskipTests -Dgpg.skip
status=$?
[ "$status" -eq 0 ]
}; then
exit 0
fi
if [ "$attempt" -lt 3 ]; then
sleep "$((attempt * 10))"
fi
done
exit "$status"
- name: Write shaft-mcp launcher argfile
shell: bash
run: |
JAR=$(ls shaft-mcp/target/shaft-mcp-*.jar | grep -v -e sources -e javadoc -e original | head -1)
CLASSPATH="$(realpath "$JAR"):$(realpath shaft-mcp/target/dependency)/*"
{
printf '"-cp"\n'
printf '"%s"\n' "$CLASSPATH"
printf '"-DheadlessExecution=true"\n'
printf 'com.shaft.mcp.ShaftMcpApplication\n'
} > shaft-mcp/target/shaft-mcp-live.args
echo "MCP_JAVA=$JAVA_HOME/bin/java" >> "$GITHUB_ENV"
echo "MCP_ARGS=$PWD/shaft-mcp/target/shaft-mcp-live.args" >> "$GITHUB_ENV"