Skip to content

Commit a4f0e50

Browse files
authored
Merge pull request #7764 from elizaOS/fix/pr-7714-7715-review-issues
Fix/pr 7714 7715 review issues
2 parents 14a3b6e + 5394a2b commit a4f0e50

309 files changed

Lines changed: 12066 additions & 3857 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
!packages/vault/dist/**
2828
!packages/skills/dist
2929
!packages/skills/dist/**
30-
!cloud/packages/sdk/dist
31-
!cloud/packages/sdk/dist/**
30+
!packages/cloud-sdk/dist
31+
!packages/cloud-sdk/dist/**
3232
!plugins/*/dist
3333
!plugins/*/dist/**
3434
**/target

.github/workflows/elizaos-os-full-release.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ on:
1111
default: false
1212

1313
jobs:
14+
# Compute the bare semver version string (no leading 'v') from the ref name.
15+
# On a 'release' event github.ref_name is the tag (e.g. v2.0.1); we strip
16+
# the prefix here so downstream jobs get a clean version like '2.0.1'.
17+
prepare:
18+
runs-on: ubuntu-24.04
19+
outputs:
20+
version: ${{ steps.parse.outputs.version }}
21+
tag: ${{ steps.parse.outputs.tag }}
22+
steps:
23+
- name: Parse version from ref
24+
id: parse
25+
run: |
26+
TAG="${{ github.ref_name }}"
27+
VERSION="${TAG#v}"
28+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
29+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
30+
echo "Resolved: tag=$TAG version=$VERSION"
31+
1432
trigger-linux-iso:
1533
uses: ./.github/workflows/build-linux-iso.yml
1634
with:
@@ -30,12 +48,12 @@ jobs:
3048
secrets: inherit
3149

3250
publish-apt:
33-
needs: [trigger-debian-package]
51+
needs: [prepare, trigger-debian-package]
3452
if: needs.trigger-debian-package.result == 'success'
3553
uses: ./.github/workflows/publish-apt-repo.yml
3654
with:
37-
version: ${{ github.ref_name }}
38-
tag: ${{ github.ref_name }}
55+
version: ${{ needs.prepare.outputs.version }}
56+
tag: ${{ needs.prepare.outputs.tag }}
3957
channel: stable
4058
secrets: inherit
4159

.github/workflows/elizaos-os-release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,17 @@ jobs:
5555
bun run --cwd packages/aosp-flasher typecheck || echo "WARN: aosp-flasher not yet present"
5656
bun run --cwd packages/aosp-flasher build || echo "WARN: aosp-flasher build skipped"
5757
58-
- name: Validate VM metadata
58+
- name: Validate Linux live USB metadata
5959
run: |
60-
cd packages/os/linux
61-
python3 -m unittest discover -s vm/tests
62-
vm/scripts/package-metadata.sh \
63-
--output-dir vm/output/ci-bundle-metadata \
64-
--archive -- --target qemu
60+
cd packages/os/linux/variants/milady-tails
61+
ELIZAOS_STATIC_SOURCE_ONLY=1 ./scripts/static-smoke.sh
6562
6663
- name: Validate OS homepage
6764
run: |
6865
bun run --cwd packages/os-homepage lint:check
6966
bun run --cwd packages/os-homepage typecheck
7067
bun run --cwd packages/os-homepage build
68+
(cd packages/os-homepage && ../../node_modules/.bin/playwright install --with-deps chromium)
7169
bun run --cwd packages/os-homepage test:e2e
7270
7371
- name: Capture homepage contact sheet

.github/workflows/publish-android-update-manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-24.04
4646
steps:
4747
- name: Checkout
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@v6
4949

5050
- name: Setup Bun
5151
uses: oven-sh/setup-bun@v2

.github/workflows/publish-apt-repo.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,25 @@ jobs:
6262
echo "can_publish=true" >> "$GITHUB_OUTPUT"
6363
fi
6464
65+
- name: Checkout main repo (to create apt-repo branch if needed)
66+
if: steps.gpg_check.outputs.can_publish == 'true'
67+
uses: actions/checkout@v6
68+
with:
69+
fetch-depth: 0
70+
path: main-repo
71+
72+
- name: Ensure apt-repo branch exists
73+
if: steps.gpg_check.outputs.can_publish == 'true'
74+
run: |
75+
cd main-repo
76+
if git ls-remote --heads origin apt-repo | grep -q apt-repo; then
77+
echo "apt-repo branch already exists"
78+
else
79+
echo "apt-repo branch does not exist — creating orphan branch"
80+
git push origin "$(git hash-object -t tree /dev/null):refs/heads/apt-repo"
81+
echo "Created empty apt-repo branch"
82+
fi
83+
6584
- name: Checkout apt-repo branch
6685
if: steps.gpg_check.outputs.can_publish == 'true'
6786
uses: actions/checkout@v6
@@ -70,7 +89,7 @@ jobs:
7089
path: apt-repo
7190
fetch-depth: 0
7291

73-
- name: Checkout main repo (for conf files)
92+
- name: Checkout release tag (for conf files)
7493
if: steps.gpg_check.outputs.can_publish == 'true'
7594
uses: actions/checkout@v6
7695
with:

.github/workflows/release-all.yml

Lines changed: 103 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -383,35 +383,108 @@ jobs:
383383
echo "npm publish for tag ${{ needs.validate.outputs.tag }} will be handled automatically by release.yaml"
384384
385385
# ─────────────────────────────────────────────
386-
# 7. SNAP-NOTIFYreminder to run snap publish
386+
# 7. SNAP — publish to Snap Store
387387
# ─────────────────────────────────────────────
388-
snap-notify:
389-
name: Snap Store (manual reminder)
388+
snap:
389+
name: Snap Store
390390
needs: validate
391+
if: needs.validate.outputs.build_linux_os == 'true'
392+
uses: ./.github/workflows/snap-publish.yml
393+
with:
394+
version: ${{ needs.validate.outputs.version }}
395+
channel: ${{ needs.validate.outputs.channel == 'stable' && 'stable' || 'edge' }}
396+
tag: ${{ needs.validate.outputs.tag }}
397+
secrets: inherit
398+
399+
# ─────────────────────────────────────────────
400+
# 8. WINDOWS STORE — build + submit MSIX
401+
# ─────────────────────────────────────────────
402+
windows-store:
403+
name: Windows Store (MSIX)
404+
needs: [validate, desktop]
405+
if: needs.validate.outputs.build_desktop == 'true' && needs.desktop.result == 'success'
406+
uses: ./.github/workflows/windows-store-release.yml
407+
with:
408+
version: ${{ needs.validate.outputs.version }}
409+
tag: ${{ needs.validate.outputs.tag }}
410+
submit_to_store: true
411+
secrets: inherit
412+
413+
# ─────────────────────────────────────────────
414+
# 9. ANDROID SIDELOAD MANIFEST — publish after
415+
# Android build succeeds.
416+
# version_code is computed from the semver:
417+
# MAJOR*10000 + MINOR*100 + PATCH (pre-release
418+
# suffix stripped) so it is deterministic from
419+
# the version string alone.
420+
# Uses gh workflow run because version_code
421+
# must be derived at runtime and reusable
422+
# workflow calls do not support computed inputs.
423+
# ─────────────────────────────────────────────
424+
android-update-manifest:
425+
name: Android Sideload Manifest
426+
needs: [validate, android]
427+
if: needs.validate.outputs.build_android == 'true' && needs.android.result == 'success'
391428
runs-on: ubuntu-24.04
429+
env:
430+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
392431
steps:
393-
- name: Snap Store publish reminder
432+
- name: Compute version_code and dispatch manifest publish
394433
run: |
395-
echo "## Snap Store" >> "$GITHUB_STEP_SUMMARY"
396-
echo "" >> "$GITHUB_STEP_SUMMARY"
397-
echo "**Action required:** Snap Store publish must be triggered manually." >> "$GITHUB_STEP_SUMMARY"
398-
echo "" >> "$GITHUB_STEP_SUMMARY"
399-
echo "Run \`.github/workflows/snap-build-test.yml\` for this version:" >> "$GITHUB_STEP_SUMMARY"
400-
echo "https://github.com/${{ github.repository }}/actions/workflows/snap-build-test.yml" >> "$GITHUB_STEP_SUMMARY"
401-
echo "" >> "$GITHUB_STEP_SUMMARY"
402-
echo "The snap workflow only builds and tests; a separate Snap Store credential" >> "$GITHUB_STEP_SUMMARY"
403-
echo "setup and \`snapcraft upload\` step is required to publish to the Snap Store." >> "$GITHUB_STEP_SUMMARY"
404-
echo ""
405-
echo "Snap Store publish: run snap-build-test.yml manually for version ${{ needs.validate.outputs.tag }}"
406-
echo "Workflow: https://github.com/${{ github.repository }}/actions/workflows/snap-build-test.yml"
434+
VERSION="${{ needs.validate.outputs.version }}"
435+
TAG="${{ needs.validate.outputs.tag }}"
436+
CHANNEL="${{ needs.validate.outputs.channel }}"
437+
438+
# Strip pre-release suffix (e.g. 2.0.1-beta.0 → 2.0.1) before arithmetic
439+
BASE_VERSION="${VERSION%%-*}"
440+
IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE_VERSION"
441+
VERSION_CODE=$(( MAJOR * 10000 + MINOR * 100 + PATCH ))
442+
echo "version_code=$VERSION_CODE for version $VERSION (channel: $CHANNEL)"
443+
444+
gh workflow run publish-android-update-manifest.yml \
445+
--ref "$TAG" \
446+
-f version="$VERSION" \
447+
-f version_code="$VERSION_CODE" \
448+
-f channel="$CHANNEL" \
449+
-f tag="$TAG"
450+
451+
# ─────────────────────────────────────────────
452+
# 10. AOSP MANIFEST — publish after Linux OS
453+
# build succeeds.
454+
# ─────────────────────────────────────────────
455+
aosp-update-manifest:
456+
name: AOSP Update Manifest
457+
needs: [validate, linux-os-iso]
458+
if: needs.validate.outputs.build_linux_os == 'true' && needs.linux-os-iso.result == 'success'
459+
uses: ./.github/workflows/publish-aosp-update-manifest.yml
460+
with:
461+
version: ${{ needs.validate.outputs.version }}
462+
channel: ${{ needs.validate.outputs.channel }}
463+
tag: ${{ needs.validate.outputs.tag }}
464+
secrets: inherit
465+
466+
# ─────────────────────────────────────────────
467+
# 11. APT REPO — publish .deb after Linux deb
468+
# build succeeds.
469+
# ─────────────────────────────────────────────
470+
apt-repo:
471+
name: apt Repository
472+
needs: [validate, linux-os-deb]
473+
if: needs.validate.outputs.build_linux_os == 'true' && needs.linux-os-deb.result == 'success'
474+
uses: ./.github/workflows/publish-apt-repo.yml
475+
with:
476+
version: ${{ needs.validate.outputs.version }}
477+
tag: ${{ needs.validate.outputs.tag }}
478+
channel: ${{ needs.validate.outputs.channel == 'stable' && 'stable' || 'beta' }}
479+
secrets: inherit
407480

408481
# ─────────────────────────────────────────────
409-
# 8. SUMMARY — report all results; optionally
482+
# 12. SUMMARY — report all results; optionally
410483
# publish the GitHub release draft.
411484
# ─────────────────────────────────────────────
412485
summary:
413486
name: Release Summary
414-
needs: [validate, desktop, android, apple, linux-os-iso, linux-os-deb, linux-os-vm, npm, snap-notify]
487+
needs: [validate, desktop, android, apple, linux-os-iso, linux-os-deb, linux-os-vm, npm, snap, windows-store, android-update-manifest, aosp-update-manifest, apt-repo]
415488
if: always()
416489
runs-on: ubuntu-24.04
417490
env:
@@ -453,17 +526,18 @@ jobs:
453526
echo ""
454527
echo "| Platform | Result |"
455528
echo "|----------|--------|"
456-
echo "| Desktop (Electrobun) | $(result_icon '${{ needs.desktop.result }}') |"
457-
echo "| Android | $(result_icon '${{ needs.android.result }}') |"
458-
echo "| Apple (iOS + macOS) | $(result_icon '${{ needs.apple.result }}') |"
459-
echo "| Linux ISO | $(result_icon "$ISO_R") |"
460-
echo "| Linux .deb | $(result_icon "$DEB_R") |"
461-
echo "| Linux VM image | $(result_icon "$VM_R") |"
462-
echo "| npm (auto-triggered) | $(result_icon '${{ needs.npm.result }}') |"
463-
echo "| Snap (manual reminder) | $(result_icon '${{ needs.snap-notify.result }}') |"
464-
echo ""
465-
echo "### Snap Store"
466-
echo "Run [snap-build-test.yml](https://github.com/${{ github.repository }}/actions/workflows/snap-build-test.yml) manually and then publish to the Snap Store."
529+
echo "| Desktop (Electrobun) | $(result_icon '${{ needs.desktop.result }}') |"
530+
echo "| Android | $(result_icon '${{ needs.android.result }}') |"
531+
echo "| Apple (iOS + macOS) | $(result_icon '${{ needs.apple.result }}') |"
532+
echo "| Linux ISO | $(result_icon "$ISO_R") |"
533+
echo "| Linux .deb | $(result_icon "$DEB_R") |"
534+
echo "| Linux VM image | $(result_icon "$VM_R") |"
535+
echo "| npm (auto-triggered) | $(result_icon '${{ needs.npm.result }}') |"
536+
echo "| Snap Store | $(result_icon '${{ needs.snap.result }}') |"
537+
echo "| Windows Store (MSIX) | $(result_icon '${{ needs.windows-store.result }}') |"
538+
echo "| Android sideload manifest | $(result_icon '${{ needs.android-update-manifest.result }}') |"
539+
echo "| AOSP update manifest | $(result_icon '${{ needs.aosp-update-manifest.result }}') |"
540+
echo "| apt repository | $(result_icon '${{ needs.apt-repo.result }}') |"
467541
} >> "$GITHUB_STEP_SUMMARY"
468542
469543
- name: Publish GitHub release (if all succeeded and not draft)
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Update vendor checksums
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Every Sunday at 00:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-checksums:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Download and hash platform-tools
19+
run: |
20+
set -euo pipefail
21+
22+
CHECKSUMS_FILE="packages/aosp-flasher/vendor/checksums.json"
23+
24+
download_and_hash() {
25+
local platform="$1"
26+
local url="$2"
27+
local tmp_file
28+
tmp_file="$(mktemp --suffix=.zip)"
29+
30+
echo "Downloading platform-tools for $platform…"
31+
curl -fsSL --retry 3 --retry-delay 5 -o "$tmp_file" "$url"
32+
33+
local sha256
34+
sha256="$(sha256sum "$tmp_file" | awk '{print $1}')"
35+
echo "$platform: $sha256"
36+
37+
# Inject sha256 into checksums.json using jq
38+
jq --arg platform "$platform" \
39+
--arg sha256 "$sha256" \
40+
--arg url "$url" \
41+
'.["platform-tools"][$platform].sha256 = $sha256 | .["platform-tools"][$platform].url = $url' \
42+
"$CHECKSUMS_FILE" > "${CHECKSUMS_FILE}.tmp"
43+
mv "${CHECKSUMS_FILE}.tmp" "$CHECKSUMS_FILE"
44+
45+
rm -f "$tmp_file"
46+
}
47+
48+
download_and_hash "darwin" "https://dl.google.com/android/repository/platform-tools-latest-darwin.zip"
49+
download_and_hash "linux" "https://dl.google.com/android/repository/platform-tools-latest-linux.zip"
50+
download_and_hash "win32" "https://dl.google.com/android/repository/platform-tools-latest-windows.zip"
51+
52+
# Update the timestamp
53+
jq --arg ts "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
54+
'."last-updated" = $ts' \
55+
"$CHECKSUMS_FILE" > "${CHECKSUMS_FILE}.tmp"
56+
mv "${CHECKSUMS_FILE}.tmp" "$CHECKSUMS_FILE"
57+
58+
echo "Updated checksums.json:"
59+
cat "$CHECKSUMS_FILE"
60+
61+
- name: Create PR if checksums changed
62+
env:
63+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: |
65+
set -euo pipefail
66+
67+
CHECKSUMS_FILE="packages/aosp-flasher/vendor/checksums.json"
68+
69+
if git diff --quiet "$CHECKSUMS_FILE"; then
70+
echo "No changes to checksums — skipping PR."
71+
exit 0
72+
fi
73+
74+
BRANCH="chore/update-vendor-checksums-$(date -u +%Y%m%d)"
75+
76+
git config user.name "github-actions[bot]"
77+
git config user.email "github-actions[bot]@users.noreply.github.com"
78+
git checkout -b "$BRANCH"
79+
git add "$CHECKSUMS_FILE"
80+
git commit -m "chore: update vendor checksums $(date -u +%Y-%m-%d)"
81+
git push origin "$BRANCH"
82+
83+
gh pr create \
84+
--title "chore: update vendor checksums $(date -u +%Y-%m-%d)" \
85+
--body "$(cat <<'EOF'
86+
## Automated vendor checksum update
87+
88+
Weekly update of SHA-256 hashes for Android Platform Tools in
89+
\`packages/aosp-flasher/vendor/checksums.json\`.
90+
91+
- macOS platform-tools
92+
- Linux platform-tools
93+
- Windows platform-tools
94+
95+
Sideloader is fetched at install time from the GitHub releases API
96+
and is not pinned here.
97+
98+
> Generated by the \`update-vendor-checksums\` workflow.
99+
EOF
100+
)" \
101+
--base develop \
102+
--head "$BRANCH" \
103+
--label "dependencies,automated"

.github/workflows/windows-store-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147

148148
submit-to-store:
149149
needs: [build-msix]
150-
if: needs.build-msix.result == 'success' && inputs.submit_to_store == true && needs.build-msix.outputs.can_submit == 'true'
150+
if: needs.build-msix.result == 'success' && inputs.submit_to_store != false && needs.build-msix.outputs.can_submit == 'true'
151151
runs-on: windows-2025
152152
timeout-minutes: 30
153153
steps:

0 commit comments

Comments
 (0)