Repository navigation
ci(eas): remote build numbers; build iOS and Android in separate jobs - #191
Open
objectstack-fleet[bot] wants to merge 1 commit into
Open
objectstack-fleet[bot] wants to merge 1 commit into
objectstack-fleet[bot] wants to merge 1 commit into
Conversation
eas.json sets cli.appVersionSource to remote, so EAS servers own iOS buildNumber and Android versionCode and production's autoIncrement bumps them there. eas-build.yml splits the platforms into two jobs: a push to main builds Android only, and iOS runs on workflow_dispatch until Apple signing credentials exist. DEPLOYMENT.md says what the push builds and where build numbers live. Claude-Session: https://claude.ai/code/session_01QSeKYnW1Xf6HDSWz1eGAqv Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:mobile#1 · os-justin · session_01QSeKYnW1Xf6HDSWz1eGAqv Seat verdict: ACCEPT — Head-sha: 维护者速读
席位意见: 改动小,两项 CI 全绿。dev 用 actionlint 检查了全部 workflow,并加了一个必须报错的对照,确认工具真在查;四种触发方式都逐条推演过。dev 关于远程构建号如何起步的说法,席位对照 席位核对
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #186. Part of #186: rulings 2 and 3 of batch #3 land here. Ruling 1 (
SENTRY_AUTH_TOKENin the EAS environment) is a maintainer action with no code, so the merge leaves the card open.Clause-②: no
Metadata-protocol: none
维护者速读
eas.json的cli.appVersionSource: "remote");eas-build.yml拆成 iOS、Android 两个独立任务。eas.json和文档,App 代码不变;回滚即 revert 本 PR。构建号首次远程构建从 1 起(production 首次为 2),此后只增不减。.github/workflows/eas-build.yml两个 job 的if:行(决定谁在推送时跑);eas.json;docs/DEPLOYMENT.md。EAS Build Android (preview)在跑、EAS Build iOS显示 skipped;Android 日志里出现 versionCode 以 1 初始化的提示,且不再有cli.appVersionSource未设置的警告。SENTRY_AUTH_TOKEN(裁决第 1 项,本 PR 不含),然后合并本 PR(workflow 是受管面,只能由你合并)。What changes
eas.json:cli.appVersionSource: "remote". EAS servers own the iOSbuildNumberand the AndroidversionCode;productionkeepsautoIncrement: true, which now increments the remote number..github/workflows/eas-build.yml: one job per platform, so one platform failing cannot skip the other.androidruns on every push tomain(profilepreview) and onworkflow_dispatchwith platformandroidorall.iosruns onworkflow_dispatchwith platformiosorallonly, until the EAS project has Apple signing credentials. A comment above itsif:spells the one replacement line that also builds iOS on push.permissionsblock, and theEXPO_TOKENenv mirror with a step-level guard in each job, so each job stays a green no-op without the secret.docs/DEPLOYMENT.md: where build numbers live and how to read or set them, and whateas-build.ymlbuilds on push..changeset/186-eas-config.md:patch, as the earlier EAS-config changeset (eas-project-link.md) was.Not changed:
app.config.ts(nothing in it is dead): neither it norapp.jsonsetsios.buildNumberorandroid.versionCode.docs/DEVICE-TESTING.md(still true): it says to open the latestpreviewAndroid build, which push still makes, and to run iOS builds by hand.eas-update.ymlandeas-submit.yml(no dependency): neither has aneeds:orworkflow_runoneas-build.yml.How the remote build number starts (measured in eas-cli 27.5.0)
build/build/android/version.js(resolveRemoteVersionCodeAsync) and its iOS twin:/androidand/iosare gitignored), so the local value comes from the app config:getVersionCode(exp)isandroid.versionCode ?? 1, andgetBuildNumber(exp)isios.buildNumberor'1'.eas build:version:set" error cannot fire here, so no one-time seeding command is needed.previewbuild (noautoIncrement) initializes the remote number at 1 and reuses the latest number afterwards. Aproductionbuild increments it, to 2 on the first run.validateAppConfigForRemoteVersionSourcerejects onlyruntimeVersion.policy: "nativeVersion". This app usesfingerprint, so it passes.eas build:version:setis needed only if a store already holds a higher build number than EAS knows. The Android build in #185 was apreviewAPK, not a store upload.Tests
The
if:expressions walked by hand, withEXPO_TOKENset:iosjobandroidjobmainevent_nameispush)previewalliosandroidWithout
EXPO_TOKEN, every step in a job that runs is skipped, so the job is a green no-op as before.Gate readings at dd9500a
node -e 'JSON.parse(…eas.json…)': exit 0.yaml.safe_load(eas-build.yml): exit 0, jobs['ios', 'android'].actionlint1.7.12 (PyPIactionlint-py):eas-build.yml: exit 0.secrets.EXPO_TOKENin a job-levelif:exits 1 withcontext "secrets" is not allowed here.prettier --check eas.json .github/workflows/eas-build.yml: exit 0.npx jest --ci __tests__/lib/app-config.test.ts(the config test): 3/3 passed, exit 0.app.config.tsis unchanged, sotsc, ESLint and the full Jest suite are left tolint-typecheck.ymlandci.ymlon this PR.Acceptance notes
The card's Acceptance needs real EAS runs, so all three items are NOT MEASURED here:
SENTRY_AUTH_TOKEN).appVersionSourcewarning is gone": visible in the first build after the merge.Verification
After the merge, open the first
EAS Buildrun onmain. Expect:EAS Build Android (preview)runs.EAS Build iOS (preview)shows as skipped.No remote versions are configured for this project, versionCode will be initialized based on the value from the local project.and thenInitialized versionCode with 1.The field "cli.appVersionSource" is not setwarning.Generated by Claude Code