Skip to content

Commit ae36a5b

Browse files
committed
fix(ci): include stealth-dns CLI in all platform packages
UI app requires stealth-dns CLI executable to function. - macOS: bundle CLI in app Contents/MacOS - Windows: include CLI in zip - Linux: include both UI and CLI in tarball
1 parent c654c4a commit ae36a5b

1 file changed

Lines changed: 28 additions & 5 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ jobs:
5050
git submodule update --init --recursive
5151
go mod tidy
5252
53+
- name: Build Windows CLI
54+
shell: bash
55+
run: |
56+
mkdir -p release/etc release/sdk
57+
go build -trimpath -ldflags="-w -s" -o release/stealth-dns.exe ./main.go
58+
cp -r etc/* release/etc/
59+
5360
- name: Build Windows UI
5461
shell: bash
5562
run: |
@@ -63,8 +70,9 @@ jobs:
6370
run: |
6471
New-Item -ItemType Directory -Force -Path dist
6572
Copy-Item ui/build/bin/stealthdns-ui.exe dist/
73+
Copy-Item release/stealth-dns.exe dist/
6674
Copy-Item sdk/nhp-agent.dll dist/ -ErrorAction SilentlyContinue
67-
Copy-Item -Recurse etc dist/
75+
Copy-Item -Recurse release/etc dist/
6876
Compress-Archive -Path dist/* -DestinationPath StealthDNS-${{ inputs.version }}-windows-amd64.zip
6977
7078
- name: Upload Windows Asset
@@ -103,13 +111,22 @@ jobs:
103111
mkdir -p release
104112
make init
105113
make build-sdk-macos
114+
make build
106115
make ui
107116
108117
- name: Package macOS Release
109118
run: |
110119
mkdir -p dist
120+
# Copy the app bundle
111121
cp -r release/stealthdns-ui.app dist/StealthDNS.app 2>/dev/null || \
112122
cp -r ui/build/bin/stealthdns-ui.app dist/StealthDNS.app
123+
# Copy stealth-dns CLI into app bundle so UI can find it
124+
cp release/stealth-dns dist/StealthDNS.app/Contents/MacOS/
125+
# Also copy SDK and config
126+
mkdir -p dist/StealthDNS.app/Contents/MacOS/sdk
127+
mkdir -p dist/StealthDNS.app/Contents/MacOS/etc
128+
cp release/sdk/nhp-agent.dylib dist/StealthDNS.app/Contents/MacOS/sdk/ 2>/dev/null || true
129+
cp -r release/etc/* dist/StealthDNS.app/Contents/MacOS/etc/ 2>/dev/null || true
113130
hdiutil create -volname "StealthDNS" -srcfolder dist -ov -format UDZO StealthDNS-${{ inputs.version }}-macos-universal.dmg
114131
115132
- name: Upload macOS Asset
@@ -153,15 +170,21 @@ jobs:
153170
mkdir -p release
154171
make init
155172
make build-sdk-linux
173+
make build
156174
make ui
157175
158176
- name: Package Linux Release
159177
run: |
160178
mkdir -p dist/StealthDNS-${{ inputs.version }}
161-
cp release/stealthdns-ui dist/StealthDNS-${{ inputs.version }}/stealthdns 2>/dev/null || \
162-
cp ui/build/bin/stealthdns-ui dist/StealthDNS-${{ inputs.version }}/stealthdns
163-
cp release/sdk/nhp-agent.so dist/StealthDNS-${{ inputs.version }}/ 2>/dev/null || \
164-
cp sdk/nhp-agent.so dist/StealthDNS-${{ inputs.version }}/ 2>/dev/null || true
179+
# Copy UI
180+
cp ui/build/bin/stealthdns-ui dist/StealthDNS-${{ inputs.version }}/stealthdns-ui
181+
# Copy CLI
182+
cp release/stealth-dns dist/StealthDNS-${{ inputs.version }}/stealth-dns
183+
# Copy SDK
184+
mkdir -p dist/StealthDNS-${{ inputs.version }}/sdk
185+
cp release/sdk/nhp-agent.so dist/StealthDNS-${{ inputs.version }}/sdk/ 2>/dev/null || \
186+
cp sdk/nhp-agent.so dist/StealthDNS-${{ inputs.version }}/sdk/ 2>/dev/null || true
187+
# Copy config
165188
cp -r release/etc dist/StealthDNS-${{ inputs.version }}/ 2>/dev/null || \
166189
cp -r etc dist/StealthDNS-${{ inputs.version }}/
167190
cd dist && tar -czvf ../StealthDNS-${{ inputs.version }}-linux-amd64.tar.gz StealthDNS-${{ inputs.version }}

0 commit comments

Comments
 (0)