Skip to content

ci: §4.1 keystore 改用 GitHub Secret(修复跨 tag 不持久) - #7

Merged
woner363 merged 1 commit into
mainfrom
fix/ci-keystore-secret
Jul 2, 2026
Merged

ci: §4.1 keystore 改用 GitHub Secret(修复跨 tag 不持久)#7
woner363 merged 1 commit into
mainfrom
fix/ci-keystore-secret

Conversation

@woner363

@woner363 woner363 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

v0.2.6 release 因签名不匹配失败,根因 actions/cache 跨 tag 不持久。改用 Secret 存 base64 keystore。versionCode=27/0.2.7-debug。详见 commit message。

v0.2.6 release workflow 失败:签名校验步骤检测到指纹与 v0.2.5 不匹配
(85d4b427 vs 0730d8ab)。根因是 actions/cache 在 tag push 触发的 run
里写入的 cache 不被后续 tag run 读取(GitHub Actions cache 持久化规则:
仅 default branch workflow run 的 cache 写入持久)。

改用评审 §4.1 原案——keystore 存 GitHub Secret:

- 删除 actions/cache + keytool 生成两步;
- 新增"Restore debug keystore from secret":从 CI_DEBUG_KEYSTORE_BASE64
  base64 解码到 runner.temp/ci-debug.keystore;secret 缺失时 ::error:: 退出;
- 三个 gradle 任务的 keystore 环境变量改读 secrets.CI_DEBUG_KEYSTORE_PASSWORD /
  CI_DEBUG_KEY_ALIAS / CI_DEBUG_KEY_PASSWORD(之前是硬编码 android);
- repo variable CI_DEBUG_CERT_SHA256 已设为新 keystore 指纹
  40f2914ee8250443cbb7262006787c2c59ea2307ef56585d2f12ba75a0391dff,
  签名校验步骤会强制比对。

versionCode=27 / versionName=0.2.7-debug(v0.2.6 tag 已作废,不移动)。

注:新 keystore 与 v0.2.5 不同(v0.2.5 的 keystore 随 cache 丢失无法复现),
v0.2.7 需卸载 v0.2.5 后安装;v0.2.7 → v0.2.8+ 起可覆盖升级。

Co-Authored-By: Claude <noreply@anthropic.com>
@woner363
woner363 merged commit c8ac83c into main Jul 2, 2026
1 check passed
@woner363
woner363 deleted the fix/ci-keystore-secret branch July 2, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant