Skip to content

Commit eaf8483

Browse files
author
Shaw
committed
Merge branch 'pr-7391' into shaw/toon-all-plugins-build-checks
# Conflicts: # packages/app-core/src/benchmark/mock-plugin.ts # packages/app-core/src/components/shell/RuntimeGate.tsx # packages/app-core/src/registry/entries/plugins/simple-voice.json # packages/benchmarks/solana/solana-gym-env/docs/trajectory-viewer/src/vite-env.d.ts # packages/benchmarks/solana/solana-gym-env/voyager/skill_runner/tsconfig.json # packages/core/package.json # packages/core/src/__tests__/description-compressed-lint.test.ts # packages/examples/roblox/tsconfig.json # plugins/app-lifeops/src/actions/inbox.ts # plugins/app-lifeops/src/actions/lifeops-mutate.ts # plugins/app-lifeops/src/actions/owner-inbox.ts # plugins/app-workflow-builder/package.json # plugins/plugin-discord/actions/readChannel.ts # plugins/plugin-discord/actions/searchMessages.ts # plugins/plugin-n8n-workflow/src/actions/createWorkflow.ts # plugins/plugin-n8n-workflow/src/routes/n8n-routes.ts # plugins/plugin-simple-voice/package.json # plugins/plugin-social-alpha/package.json # scripts/launch-qa/check-mobile-artifacts.mjs
2 parents 43f56cc + e423c76 commit eaf8483

496 files changed

Lines changed: 5517 additions & 1800 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.

.github/workflows/android-release.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
type: string
1010
default: internal
1111
version_name:
12-
description: "Version name (e.g. 2.0.0-alpha.82)"
12+
description: "Version name (e.g. 2.0.0-beta.0)"
1313
required: true
1414
type: string
1515
secrets:
@@ -34,7 +34,7 @@ on:
3434
- production
3535
default: internal
3636
version_name:
37-
description: "Version name (e.g. 2.0.0-alpha.82)"
37+
description: "Version name (e.g. 2.0.0-beta.0)"
3838
required: false
3939
type: string
4040

@@ -86,14 +86,57 @@ jobs:
8686
VERSION_NAME=$(node -p "require('./package.json').version")
8787
fi
8888
89-
# Generate version code from version string
90-
# 2.0.0-alpha.82 -> 2000082, 2.1.3 -> 2001003
91-
MAJOR=$(echo "$VERSION_NAME" | cut -d. -f1)
92-
MINOR=$(echo "$VERSION_NAME" | cut -d. -f2 | cut -d- -f1)
93-
PATCH=$(echo "$VERSION_NAME" | cut -d. -f3 | cut -d- -f1)
94-
PRE=$(echo "$VERSION_NAME" | grep -oP '(?<=\.)\d+$' || echo "0")
89+
# Generate a monotonic Android version code from semver.
90+
# 2.0.0-alpha.82 -> 200001082, 2.0.0-beta.0 -> 200003000,
91+
# 2.0.0 -> 200009000, 2.1.3 -> 201039000.
92+
VERSION_CODE=$(node - "$VERSION_NAME" <<'NODE'
93+
const version = process.argv[2];
94+
const match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+)(?:\.(\d+))?)?$/);
95+
if (!match) {
96+
console.error(`Invalid semver version: ${version}`);
97+
process.exit(1);
98+
}
9599
96-
VERSION_CODE=$(( MAJOR * 1000000 + MINOR * 10000 + PATCH * 100 + PRE ))
100+
const [, majorRaw, minorRaw, patchRaw, prerelease, prereleaseRaw = "0"] =
101+
match;
102+
const major = Number(majorRaw);
103+
const minor = Number(minorRaw);
104+
const patch = Number(patchRaw);
105+
const prereleaseNumber = Number(prereleaseRaw);
106+
if (
107+
!Number.isInteger(major) ||
108+
!Number.isInteger(minor) ||
109+
!Number.isInteger(patch) ||
110+
!Number.isInteger(prereleaseNumber) ||
111+
prereleaseNumber < 0 ||
112+
prereleaseNumber > 999
113+
) {
114+
console.error(`Invalid Android version component in ${version}`);
115+
process.exit(1);
116+
}
117+
118+
const channelOffsets = {
119+
alpha: 1000,
120+
beta: 3000,
121+
rc: 5000,
122+
nightly: 7000,
123+
};
124+
const channelOffset = prerelease
125+
? (channelOffsets[prerelease] ?? 8000)
126+
: 9000;
127+
const code =
128+
major * 100000000 +
129+
minor * 1000000 +
130+
patch * 10000 +
131+
channelOffset +
132+
prereleaseNumber;
133+
if (code > 2100000000) {
134+
console.error(`Android versionCode ${code} exceeds Play Store limit`);
135+
process.exit(1);
136+
}
137+
console.log(code);
138+
NODE
139+
)
97140
98141
echo "name=$VERSION_NAME" >> "$GITHUB_OUTPUT"
99142
echo "code=$VERSION_CODE" >> "$GITHUB_OUTPUT"
@@ -204,7 +247,7 @@ jobs:
204247
run: |
205248
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
206249
echo "track=${{ inputs.track }}" >> "$GITHUB_OUTPUT"
207-
elif echo "${{ needs.build-aab.outputs.version_name }}" | grep -qE '(alpha|beta|rc)'; then
250+
elif echo "${{ needs.build-aab.outputs.version_name }}" | grep -qE '(beta|rc)'; then
208251
echo "track=internal" >> "$GITHUB_OUTPUT"
209252
else
210253
echo "track=production" >> "$GITHUB_OUTPUT"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
type: string
1515
default: testflight
1616
version:
17-
description: "Version override (e.g. 2.0.0-alpha.82)"
17+
description: "Version override (e.g. 2.0.0-beta.0)"
1818
required: true
1919
type: string
2020
secrets:
@@ -64,7 +64,7 @@ on:
6464
- app-store
6565
default: testflight
6666
version:
67-
description: "Version override (e.g. 2.0.0-alpha.82)"
67+
description: "Version override (e.g. 2.0.0-beta.0)"
6868
required: false
6969
type: string
7070

.github/workflows/cloud-cf-deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ jobs:
138138
- name: Install dependencies
139139
run: bun install --frozen-lockfile
140140

141+
- name: Build linked elizaOS core workspace
142+
run: bun run build:linked-core
143+
141144
- name: Verify Frontend
142145
run: bun run --cwd apps/frontend typecheck
143146

.github/workflows/publish-packages.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_call:
77
inputs:
88
version:
9-
description: "Version to publish (e.g. 2.0.0-alpha.7)"
9+
description: "Version to publish (e.g. 2.0.0-beta.0)"
1010
required: true
1111
type: string
1212
pypi:
@@ -39,7 +39,7 @@ on:
3939
workflow_dispatch:
4040
inputs:
4141
version:
42-
description: "Version to publish (e.g. 2.0.0-alpha.7)"
42+
description: "Version to publish (e.g. 2.0.0-beta.0)"
4343
required: true
4444
type: string
4545
pypi:
@@ -87,16 +87,16 @@ jobs:
8787
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
8888
echo "npm_version=$VERSION" >> "$GITHUB_OUTPUT"
8989
90-
# PEP 440 conversion: 2.0.0-alpha.7 → 2.0.0a7
91-
PYPI_VERSION=$(echo "$VERSION" | sed -E 's/-alpha\.?/a/; s/-beta\.?/b/; s/-rc\.?/rc/')
90+
# PEP 440 conversion: 2.0.0-beta.0 → 2.0.0b0
91+
PYPI_VERSION=$(echo "$VERSION" | sed -E 's/-beta\.?/b/; s/-rc\.?/rc/')
9292
echo "pypi_version=$PYPI_VERSION" >> "$GITHUB_OUTPUT"
9393
94-
# Debian version: 2.0.0-alpha.7 → 2.0.0~alpha7-1
95-
DEB_VERSION=$(echo "$VERSION" | sed -E 's/-alpha\./~alpha/; s/-beta\./~beta/; s/-rc\./~rc/')
94+
# Debian version: 2.0.0-beta.0 → 2.0.0~beta0-1
95+
DEB_VERSION=$(echo "$VERSION" | sed -E 's/-beta\./~beta/; s/-rc\./~rc/')
9696
echo "deb_version=${DEB_VERSION}-1" >> "$GITHUB_OUTPUT"
9797
9898
# Pre-release detection
99-
if echo "$VERSION" | grep -qE '(alpha|beta|rc)'; then
99+
if echo "$VERSION" | grep -qE '(beta|rc)'; then
100100
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
101101
else
102102
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
@@ -105,7 +105,7 @@ jobs:
105105
echo "Version: $VERSION"
106106
echo "PyPI: $PYPI_VERSION"
107107
echo "Debian: ${DEB_VERSION}-1"
108-
echo "Pre-release: $(echo "$VERSION" | grep -qE '(alpha|beta|rc)' && echo true || echo false)"
108+
echo "Pre-release: $(echo "$VERSION" | grep -qE '(beta|rc)' && echo true || echo false)"
109109
110110
- name: Check registry credentials
111111
id: registry_credentials
@@ -399,6 +399,39 @@ jobs:
399399
flatpak install -y --user flathub org.freedesktop.Platform//24.08
400400
flatpak install -y --user flathub org.freedesktop.Sdk//24.08
401401
402+
- name: Wait for npm package version
403+
run: |
404+
set -euo pipefail
405+
VERSION="${{ needs.prepare.outputs.npm_version }}"
406+
for attempt in $(seq 1 30); do
407+
if curl -fsS "https://registry.npmjs.org/elizaos/${VERSION}" >/dev/null; then
408+
echo "Found elizaos@${VERSION} on npm"
409+
exit 0
410+
fi
411+
echo "elizaos@${VERSION} is not visible on npm yet (attempt ${attempt}/30); waiting..."
412+
sleep 20
413+
done
414+
echo "::error::elizaos@${VERSION} was not visible on npm before Flatpak build"
415+
exit 1
416+
417+
- name: Prepare Flatpak release manifest
418+
run: |
419+
set -euo pipefail
420+
VERSION="${{ needs.prepare.outputs.npm_version }}"
421+
TODAY="$(date -u +%F)"
422+
MANIFEST="packages/app-core/packaging/flatpak/ai.elizaos.App.yml"
423+
METAINFO="packages/app-core/packaging/flatpak/ai.elizaos.App.metainfo.xml"
424+
425+
sed -i -E \
426+
"s#npm install -g elizaos(@[^[:space:]]+)? --prefix=/app --ignore-scripts#npm install -g elizaos@${VERSION} --prefix=/app --ignore-scripts#" \
427+
"$MANIFEST"
428+
sed -i -E \
429+
"s#<release version=\"[^\"]+\" date=\"[^\"]+\">#<release version=\"${VERSION}\" date=\"${TODAY}\">#" \
430+
"$METAINFO"
431+
432+
grep -n "npm install -g elizaos" "$MANIFEST"
433+
grep -n "<release version" "$METAINFO" | head -1
434+
402435
- name: Build Flatpak
403436
working-directory: packages/app-core/packaging/flatpak
404437
run: |

.github/workflows/release-electrobun.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on:
3636
workflow_call:
3737
inputs:
3838
tag:
39-
description: "Release tag override (e.g. v2.0.0-alpha.3)"
39+
description: "Release tag override (e.g. v2.0.0-beta.0)"
4040
required: false
4141
type: string
4242
draft:
@@ -57,7 +57,7 @@ on:
5757
workflow_dispatch:
5858
inputs:
5959
tag:
60-
description: "Release tag (e.g. v2.0.0-alpha.3)"
60+
description: "Release tag (e.g. v2.0.0-beta.0)"
6161
required: false
6262
type: string
6363
draft:
@@ -94,10 +94,7 @@ jobs:
9494
${{
9595
github.event_name != 'push' ||
9696
(
97-
!contains(github.ref_name, '-alpha') &&
98-
!contains(github.ref_name, '-beta') &&
99-
!contains(github.ref_name, '-rc') &&
100-
!contains(github.ref_name, '-nightly')
97+
!contains(github.ref_name, '-')
10198
)
10299
}}
103100
runs-on: ${{ vars.RUNNER_UBUNTU || 'ubuntu-24.04' }}
@@ -126,7 +123,7 @@ jobs:
126123
fi
127124
VERSION="${TAG#v}"
128125
# canary for pre-release tags, stable for everything else
129-
if echo "$VERSION" | grep -qE '(alpha|beta|rc|nightly)'; then
126+
if [[ "$VERSION" == *"-"* ]]; then
130127
BUILD_ENV="canary"
131128
else
132129
BUILD_ENV="stable"
@@ -1659,7 +1656,7 @@ jobs:
16591656
target_commitish: ${{ needs.prepare.outputs.source_sha }}
16601657
name: Eliza ${{ needs.prepare.outputs.tag }}
16611658
draft: ${{ inputs.draft || false }}
1662-
prerelease: ${{ contains(needs.prepare.outputs.version, 'alpha') || contains(needs.prepare.outputs.version, 'beta') || contains(needs.prepare.outputs.version, 'rc') || contains(needs.prepare.outputs.version, 'nightly') }}
1659+
prerelease: ${{ contains(needs.prepare.outputs.version, '-') }}
16631660
generate_release_notes: true
16641661
files: release-files/*
16651662
env:

.github/workflows/release-orchestrator.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_call:
77
inputs:
88
version:
9-
description: "Version to distribute (e.g. 2.0.0-alpha.87)"
9+
description: "Version to distribute (e.g. 2.0.0-beta.0)"
1010
required: true
1111
type: string
1212
publish_npm:
@@ -42,7 +42,7 @@ on:
4242
workflow_dispatch:
4343
inputs:
4444
version:
45-
description: "Version to distribute (e.g. 2.0.0-alpha.87)"
45+
description: "Version to distribute (e.g. 2.0.0-beta.0)"
4646
required: true
4747
type: string
4848
publish_npm:
@@ -120,7 +120,12 @@ jobs:
120120
ANDROID_TRACK="production"
121121
APPLE_TRACK="app-store"
122122
123-
if echo "$VERSION" | grep -qiE '(alpha|beta|rc|nightly)'; then
123+
if echo "$VERSION" | grep -qi 'alpha'; then
124+
echo "::error::Alpha releases are disabled. Use a beta, rc, nightly, or stable version."
125+
exit 1
126+
fi
127+
128+
if echo "$VERSION" | grep -qiE '(beta|rc|nightly)'; then
124129
IS_PRERELEASE="true"
125130
ANDROID_TRACK="internal"
126131
APPLE_TRACK="testflight"

0 commit comments

Comments
 (0)