Repository navigation
432 lines (421 loc) · 22.4 KB
/
Copy pathrelease.yml
File metadata and controls
432 lines (421 loc) · 22.4 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
name: Release
on:
workflow_dispatch:
inputs:
sdk_package_run:
description: Optional existing signed Mac artifact run for SDK-only diagnostics
required: false
default: ''
type: string
platform:
description: Native package target for manual acceptance
required: false
default: all
type: choice
options: [all, linux, macos, windows]
push:
tags:
- "v*.*.*"
permissions:
contents: read
actions: read
jobs:
release-policy:
runs-on: ubuntu-22.04
outputs:
macos: ${{ steps.policy.outputs.macos }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- id: policy
run: |
node -e 'const fs = require("fs"); const policy = JSON.parse(fs.readFileSync("release/platforms.json")); const version = JSON.parse(fs.readFileSync("tauri/package.json")).version; const macos = policy.version !== version || policy.platforms.includes("macos"); fs.appendFileSync(process.env.GITHUB_OUTPUT, `macos=${macos}\n`);'
linux:
if: ${{ !inputs.sdk_package_run && (!inputs.platform || inputs.platform == 'all' || inputs.platform == 'linux') }}
runs-on: ubuntu-22.04
defaults:
run:
working-directory: tauri
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
cache-dependency-path: tauri/package-lock.json
- name: Validate tag version
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
RELEASE_TAG="v$(node -p 'require("./package.json").version')"
fi
[[ "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
VERSION="${RELEASE_TAG#v}"
VERSION="$VERSION" node -e '
const fs = require("fs");
const expected = process.env.VERSION;
const actual = [
JSON.parse(fs.readFileSync("package.json", "utf8")).version,
JSON.parse(fs.readFileSync("package-lock.json", "utf8")).version,
JSON.parse(fs.readFileSync("src-tauri/tauri.conf.json", "utf8")).version,
fs.readFileSync("src-tauri/Cargo.toml", "utf8").match(/^version = "([^"]+)"/m)?.[1],
fs.readFileSync("src-tauri/Cargo.lock", "utf8").match(/name = "multi-codex-desktop"\nversion = "([^"]+)"/)?.[1],
];
if (actual.some(version => version !== expected)) {
throw new Error(`Tag ${expected} does not match committed versions: ${actual.join(", ")}`);
}
'
- name: Install Linux dependencies
run: |
sudo apt-get update
# Recommended desktop portals wait for a graphical login on headless
# runners, blocking GTK startup. Required libraries remain installed.
sudo apt-get install --no-install-recommends -y firejail imagemagick libwebkit2gtk-4.1-dev libgtk-layer-shell-dev libappindicator3-dev librsvg2-dev patchelf rpm x11-utils xdotool xvfb libnss3 libasound2 libgbm1 libxss1
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
workspaces: tauri/src-tauri
- run: npm ci
- run: npm run check:secrets
- run: npm run test:release
- run: cargo test --locked --manifest-path ../cli/Cargo.toml -p multi-codex-core
- name: Verify two isolated T3 desktop instances
run: xvfb-run -a python3 scripts/t3-native-smoke.py
- run: npm run test:release-gates
- name: Build Linux packages without signing secrets
run: python3 scripts/github-asset-build.py -- npm run release:linux
- name: Sign final Linux updater payload
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
test -n "$TAURI_SIGNING_PRIVATE_KEY"
artifacts=(src-tauri/target/release/bundle/appimage/*.AppImage)
[[ ${#artifacts[@]} -eq 1 && -f "${artifacts[0]}" ]]
./node_modules/.bin/tauri signer sign "${artifacts[0]}"
- name: Exercise native SDK update and signed-payload refusal on Linux
run: |
cargo build --locked --manifest-path src-tauri/Cargo.toml --example native-updater
xvfb-run -a python3 scripts/native-updater-smoke.py --harness src-tauri/target/debug/examples/native-updater --payload src-tauri/target/release/bundle/appimage/*.AppImage --output "$RUNNER_TEMP/native-updater-linux/result.json"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: native-updater-linux-evidence
path: ${{ runner.temp }}/native-updater-linux/
- name: Remove build-time WebKit to verify self-contained helpers
run: |
sudo apt-get remove -y libwebkit2gtk-4.1-0 libjavascriptcoregtk-4.1-0
if ldconfig -p | grep -Eq 'lib(webkit2gtk|javascriptcoregtk)-4\.1\.so'; then
echo "System WebKit still present; the catalog test would not prove bundled helper loading" >&2
exit 1
fi
- name: Verify AppImageHub-compatible launch and visible window
env:
APPIMAGE_SMOKE_EVIDENCE_DIR: ${{ runner.temp }}/appimage-catalog-evidence
run: bash scripts/appimage-catalog-display-smoke.sh src-tauri/target/release/bundle/appimage/*.AppImage
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: appimage-catalog-evidence
path: ${{ runner.temp }}/appimage-catalog-evidence/
if-no-files-found: warn
- name: Verify install and update of the exact Linux candidate
run: |
mkdir "$RUNNER_TEMP/linux-installer-assets"
cp src-tauri/target/release/bundle/appimage/*.AppImage SHA256SUMS "$RUNNER_TEMP/linux-installer-assets/"
VERSION=$(node -p 'require("./package.json").version')
python3 scripts/linux-installer-smoke.py "$RUNNER_TEMP/linux-installer-assets" "v$VERSION" "$RUNNER_TEMP/linux-installer-result.json"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: linux-installer-evidence
path: ${{ runner.temp }}/linux-installer-result.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: linux-packages
path: |
tauri/src-tauri/target/release/bundle/appimage/*.AppImage
tauri/src-tauri/target/release/bundle/appimage/*.AppImage.sig
tauri/src-tauri/target/release/bundle/deb/*.deb
tauri/src-tauri/target/release/bundle/rpm/*.rpm
if-no-files-found: error
macos:
needs: release-policy
if: ${{ !inputs.sdk_package_run && (needs.release-policy.outputs.macos == 'true' || inputs.platform == 'macos') && (!inputs.platform || inputs.platform == 'all' || inputs.platform == 'macos') }}
runs-on: macos-26
env:
MACOSX_DEPLOYMENT_TARGET: "26.0"
defaults:
run:
working-directory: tauri
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
cache-dependency-path: tauri/package-lock.json
- name: Validate tag version
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
RELEASE_TAG="v$(node -p 'require("./package.json").version')"
fi
[[ "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
VERSION="${RELEASE_TAG#v}"
VERSION="$VERSION" node -e '
const fs = require("fs");
const expected = process.env.VERSION;
const actual = [
JSON.parse(fs.readFileSync("package.json", "utf8")).version,
JSON.parse(fs.readFileSync("package-lock.json", "utf8")).version,
JSON.parse(fs.readFileSync("src-tauri/tauri.conf.json", "utf8")).version,
fs.readFileSync("src-tauri/Cargo.toml", "utf8").match(/^version = "([^"]+)"/m)?.[1],
fs.readFileSync("src-tauri/Cargo.lock", "utf8").match(/name = "multi-codex-desktop"\nversion = "([^"]+)"/)?.[1],
];
if (actual.some(version => version !== expected)) {
throw new Error(`Tag ${expected} does not match committed versions: ${actual.join(", ")}`);
}
'
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
targets: aarch64-apple-darwin
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
workspaces: tauri/src-tauri
- run: npm ci
- run: npm test
- run: npm run build:desktop
- run: cargo test --manifest-path src-tauri/Cargo.toml
- name: Install disposable native VS Code test dependency
run: |
curl --fail --location --retry 3 https://update.code.visualstudio.com/latest/darwin-arm64/stable -o "$RUNNER_TEMP/vscode.zip"
ditto -xk "$RUNNER_TEMP/vscode.zip" /Applications
- name: Exercise native Keychain and isolated VS Code startup
run: |
cargo test --manifest-path src-tauri/Cargo.toml macos_live_keychain_round_trip -- --ignored --test-threads=1
cargo test --manifest-path src-tauri/Cargo.toml macos_live_vscode_launch_is_detected -- --ignored --test-threads=1
- name: Exercise isolated CLI launch in native Terminal
run: cargo test --manifest-path src-tauri/Cargo.toml macos_live_cli_launch_is_isolated -- --ignored --test-threads=1
- name: Install official standalone desktop for native launch smoke
run: |
# Pin the official version with completed authenticated isolation evidence.
# The moving Codex.dmg URL can upgrade independently and must not expand the allowlist.
curl --fail --location --retry 3 https://persistent.oaistatic.com/codex-app-prod/ChatGPT-darwin-arm64-26.930.51102.zip -o "$RUNNER_TEMP/standalone.zip"
mkdir "$RUNNER_TEMP/standalone-volume"
ditto -xk "$RUNNER_TEMP/standalone.zip" "$RUNNER_TEMP/standalone-volume"
DESKTOP_APP=$(find "$RUNNER_TEMP/standalone-volume" -maxdepth 1 -name '*.app' -print -quit)
test -n "$DESKTOP_APP"
codesign --verify --deep --strict "$DESKTOP_APP"
ditto "$DESKTOP_APP" "/Applications/$(basename "$DESKTOP_APP")"
- name: Verify production standalone launch and restart with long private paths
run: cargo test --manifest-path src-tauri/Cargo.toml macos_live_standalone_launch_is_detected -- --ignored --test-threads=1
- name: Build Apple Silicon candidate
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
for signing_setting in APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID; do
[[ -n "${!signing_setting}" ]] || unset "$signing_setting"
done
test -n "$TAURI_SIGNING_PRIVATE_KEY"
npm run tauri -- build --bundles app,dmg --target aarch64-apple-darwin --config src-tauri/tauri.updater.conf.json
- name: Inspect and smoke-test Apple Silicon app bundle
run: |
APP=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -type d -name '*.app' -print -quit)
test -n "$APP"
EXECUTABLE=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info.plist")
BINARY="$APP/Contents/MacOS/$EXECUTABLE"
test -x "$BINARY"
test -f "$APP/Contents/Resources/icon.icns"
ARCHS=$(lipo -archs "$BINARY")
[[ " $ARCHS " == *" arm64 "* ]]
[[ " $ARCHS " != *" x86_64 "* ]]
python3 scripts/macos-smoke.py "$BINARY"
- name: Verify Orbit, minimal upgrade notes and packaged close/reopen lifecycle
env:
MAC_LIFECYCLE_VARIANT: candidate
run: |
APP=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -type d -name '*.app' -print -quit)
ditto "$APP" '/Applications/Multi Codex.app'
python3 ../release/scripts/macos-lifecycle-probe.py '/Applications/Multi Codex.app'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: orbit-macos-lifecycle-evidence
path: ${{ runner.temp }}/hud-backend-evidence/candidate/
if-no-files-found: warn
- name: Check signing and notarization
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
APP=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -type d -name '*.app' -print -quit)
# Every updater bundle needs a complete Apple Silicon code seal. The
# default is ad hoc; optional configured Developer ID remains supported.
codesign --verify --deep --strict "$APP"
test -f "$APP/Contents/_CodeSignature/CodeResources"
if [[ -z "$APPLE_SIGNING_IDENTITY" ]]; then
echo "Complete ad hoc bundle signature verified; Developer ID and notarization are not configured."
else
codesign --verify --deep --strict "$APP"
if [[ -n "$APPLE_ID" && -n "$APPLE_PASSWORD" && -n "$APPLE_TEAM_ID" ]]; then
xcrun stapler validate "$APP"
spctl --assess --type execute --verbose "$APP"
else
echo "Developer ID signature verified; optional notarization credentials are not configured."
fi
fi
- name: Normalize DMG name
run: |
VERSION=$(node -p 'require("./package.json").version')
DMG=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/dmg -type f -name '*.dmg' -print -quit)
test -n "$DMG"
mv "$DMG" "Multi.Codex_${VERSION}_aarch64.dmg"
UPDATE=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -name "*.app.tar.gz" -print -quit)
test -f "$UPDATE.sig"
cp "$UPDATE" "Multi.Codex_${VERSION}_aarch64.app.tar.gz"
cp "$UPDATE.sig" "Multi.Codex_${VERSION}_aarch64.app.tar.gz.sig"
- name: Verify install and update of the exact Mac candidate
run: |
mkdir "$RUNNER_TEMP/mac-installer-assets"
cp Multi.Codex_*_aarch64.dmg "$RUNNER_TEMP/mac-installer-assets/"
(cd "$RUNNER_TEMP/mac-installer-assets" && shasum -a 256 *.dmg > SHA256SUMS)
VERSION=$(node -p 'require("./package.json").version')
python3 scripts/macos-installer-smoke.py "$RUNNER_TEMP/mac-installer-assets" "v$VERSION"
- name: Exercise native SDK update and signed-payload refusal on macOS
run: |
cargo build --locked --manifest-path src-tauri/Cargo.toml --example native-updater
APP=$(find src-tauri/target/aarch64-apple-darwin/release/bundle/macos -maxdepth 1 -type d -name '*.app' -print -quit)
python3 scripts/native-updater-smoke.py --harness src-tauri/target/debug/examples/native-updater --payload Multi.Codex_*_aarch64.app.tar.gz --app "$APP" --output "$RUNNER_TEMP/native-updater-macos/result.json"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: native-updater-macos-evidence
path: ${{ runner.temp }}/native-updater-macos/
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: macos-installer-evidence
path: ${{ runner.temp }}/multi-codex-macos-installer-evidence/
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: macos-package
path: |
tauri/Multi.Codex_*_aarch64.dmg
tauri/Multi.Codex_*_aarch64.app.tar.gz
tauri/Multi.Codex_*_aarch64.app.tar.gz.sig
if-no-files-found: error
- name: Upload macOS startup evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: macos-startup-evidence-${{ github.workflow }}
path: ${{ runner.temp }}/multi-codex-macos-evidence/
if-no-files-found: warn
windows:
if: ${{ !inputs.sdk_package_run && (!inputs.platform || inputs.platform == 'all' || inputs.platform == 'windows') }}
uses: ./.github/workflows/windows.yml
with:
signed_updates: true
secrets:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
extensions:
if: ${{ !inputs.sdk_package_run && (!inputs.platform || inputs.platform == 'all' || inputs.platform == 'all') }}
uses: ./.github/workflows/extension.yml
prepare-draft:
permissions:
contents: write
actions: read
if: ${{ always() && github.event_name != 'workflow_dispatch' && needs.linux.result == 'success' && needs.windows.result == 'success' && needs.extensions.result == 'success' && (needs.macos.result == 'success' || needs.release-policy.outputs.macos == 'false') }}
needs: [release-policy, linux, macos, windows, extensions]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: downloaded-assets
merge-multiple: true
- name: Prepare release draft
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir release-assets
find downloaded-assets -type f \( -name '*.AppImage' -o -name '*.deb' -o -name '*.rpm' -o -name '*.dmg' -o -name '*_x64-setup.exe' -o -name '*.vsix' \) -exec cp {} release-assets/ \;
cd release-assets
mapfile -d '' ASSETS < <(find . -maxdepth 1 -type f -print0 | sort -z)
if [[ "$GITHUB_REF_NAME" == "v1.8.0" ]]; then
rm -f Multi.Codex_1.8.0_aarch64.dmg
mapfile -d '' ASSETS < <(find . -maxdepth 1 -type f -print0 | sort -z)
((${#ASSETS[@]} == 8))
else
((${#ASSETS[@]} == 9))
fi
cp ../scripts/install-app.sh ../scripts/update-app.sh ../scripts/install-app.ps1 ../scripts/update-app.ps1 .
ASSETS+=(./install-app.sh ./update-app.sh ./install-app.ps1 ./update-app.ps1)
find ../downloaded-assets -type f \( -name "*.AppImage.sig" -o -name "*.exe.sig" -o -name "*.app.tar.gz" -o -name "*.app.tar.gz.sig" \) -exec cp {} . \;
if [[ "$GITHUB_REF_NAME" == "v1.8.0" ]]; then rm -f *.app.tar.gz *.app.tar.gz.sig; fi
node ../tauri/scripts/updater-manifest.mjs . "${GITHUB_REF_NAME#v}"
mapfile -d '' ASSETS < <(find . -maxdepth 1 -type f -print0 | sort -z)
sha256sum "${ASSETS[@]}" | sed 's# \./# #' > SHA256SUMS
ASSETS+=(SHA256SUMS)
cd ..
if gh release view "$GITHUB_REF_NAME" --json isDraft >/dev/null 2>&1; then
[[ "$(gh release view "$GITHUB_REF_NAME" --json isDraft --jq '.isDraft')" == "true" ]]
gh release upload "$GITHUB_REF_NAME" release-assets/* --clobber
else
gh release create "$GITHUB_REF_NAME" release-assets/* --draft --title "Multi Codex $GITHUB_REF_NAME — validation pending" --notes ''
fi
echo "Draft created. Validate exact assets, then publish manually with a short website link."
mac-sdk-probe:
if: inputs.sdk_package_run
runs-on: macos-26
env:
MACOSX_DEPLOYMENT_TARGET: '26.0'
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
workspaces: tauri/src-tauri
cache-on-failure: true
- name: Record exact candidate workflow source
env:
GH_TOKEN: ${{ github.token }}
PACKAGE_RUN: ${{ inputs.sdk_package_run }}
run: |
[[ "$PACKAGE_RUN" =~ ^[0-9]+$ ]]
SOURCE=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$PACKAGE_RUN" --jq .head_sha)
echo "NATIVE_UPDATER_CANDIDATE_SOURCE=$SOURCE" >> "$GITHUB_ENV"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: macos-package
path: candidate
run-id: ${{ inputs.sdk_package_run }}
github-token: ${{ github.token }}
- name: Compile pinned SDK harness without rebuilding the candidate
run: |
mkdir -p tauri/resources/managed-extension
cargo build --locked --manifest-path tauri/src-tauri/Cargo.toml --example native-updater
- name: Inspect actual signed candidate and native SDK replacement
run: |
mkdir candidate/source
tar -xzf candidate/*.app.tar.gz -C candidate/source
APP=$(find candidate/source -maxdepth 1 -type d -name '*.app' -print -quit)
test -n "$APP"
python3 tauri/scripts/native-updater-smoke.py --harness tauri/src-tauri/target/debug/examples/native-updater --payload candidate/*.app.tar.gz --app "$APP" --output "$RUNNER_TEMP/native-updater-macos/result.json"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: native-updater-macos-evidence
path: ${{ runner.temp }}/native-updater-macos/