Skip to content

fix(ci): verify the release signature digest across build-tools releases - #71

Merged
CATMIAOZHI merged 1 commit into
personal/mainfrom
fix/apksigner-cert-format
Oct 15, 2026
Merged

CATMIAOZHI merged 1 commit into
personal/mainfrom
fix/apksigner-cert-format

Conversation

@CATMIAOZHI

Copy link
Copy Markdown
Owner

Android Build 的 release 产物校验在 ry.8 上失败了:build-tools 37.0.0 把 apksigner verify --print-certs 的输出标签从 Signer #1 certificate SHA-256 digest: 改成了 V2 Signer: certificate SHA-256 digest:,原来的 grep -Fqi "Signer #1 ..." 因此永远匹配不上,set -e 下静默退出 1,构建出来的 APK 也被判定为校验失败(上传产物步骤被跳过)。

改动只在校验逻辑本身:匹配任意签名行末尾的证书摘要,并在不匹配时打印证书内容,避免再次出现无输出的失败。

验证:

  • 用本机 build-tools 35.0.0 与 37.0.0 对已签名 APK 的真实输出分别跑过新表达式,两者都匹配;摘要不匹配时按预期报错。
  • bash -n 通过;workflow YAML 解析通过。

范围仅为 .github/workflows/android-build.yml,不涉及应用代码。

build-tools 37 labels apksigner's signer as `V2 Signer` instead of `Signer #1`, so the release signature check never matched and failed the step without any output. Match the digest at the end of any signer line and print the certificate when it does not match.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-15T03:51:47.124848Z 8f6f26f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CATMIAOZHI
CATMIAOZHI merged commit 9902726 into personal/main Oct 15, 2026
16 checks passed
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