asc-appstore-release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApp Store Release with asc
in GitHub Actions
asc在GitHub Actions中使用asc
实现App Store发布
ascThe developer's mental model:
Signed IPA/PKG (from your build step)
→ asc builds upload --wait # upload + wait for Apple processing
→ asc builds add-beta-group # optional: TestFlight distribution
→ asc builds update-beta-notes # optional: "What's New" text
→ asc versions set-build # link build to App Store version
→ asc versions check-readiness # gate: verify all checks pass
→ asc versions submit # submit for App Store reviewSee workflow-template.md for complete copy-paste workflows.
开发者的流程模型:
签名后的IPA/PKG(来自你的构建步骤)
→ asc builds upload --wait # 上传并等待苹果处理
→ asc builds add-beta-group # 可选:TestFlight分发
→ asc builds update-beta-notes # 可选:设置“新功能介绍”文本
→ asc versions set-build # 将构建版本关联至App Store版本
→ asc versions check-readiness # 检查环节:验证所有检查项是否通过
→ asc versions submit # 提交至App Store审核完整的可直接复制使用的工作流请查看workflow-template.md。
Mac App Store Certificate Setup
Mac App Store证书设置
Before the first CI run, you need and .
Run the interactive setup script:
APPLE_MAS_CERTIFICATE_P12APPLE_MAS_CERTIFICATE_PASSWORDbash
.claude/skills/asc-appstore-release/scripts/setup-mas-certs.shThe script walks through the full mental model:
Generate CSR
→ asc certificates create MAC_APP_DISTRIBUTION (automated)
→ Apple portal: Mac Installer Distribution cert (one browser step)
→ Export both as P12 via Keychain Access
→ Print base64 values ready to paste into GitHub Secrets在首次运行CI之前,你需要准备和。运行交互式设置脚本:
APPLE_MAS_CERTIFICATE_P12APPLE_MAS_CERTIFICATE_PASSWORDbash
.claude/skills/asc-appstore-release/scripts/setup-mas-certs.sh该脚本会引导你完成以下完整流程:
生成CSR
→ asc certificates create MAC_APP_DISTRIBUTION (自动执行)
→ 苹果后台:获取Mac Installer Distribution证书(一步浏览器操作)
→ 通过钥匙串访问导出为P12格式
→ 打印可直接粘贴到GitHub Secrets中的base64值Install asc
in GitHub Actions
asc在GitHub Actions中安装asc
ascyaml
- name: Install asc CLI
run: |
brew tap tddworks/tap
brew install asccliOr download a specific version directly:
yaml
- name: Install asc CLI
run: |
VERSION="0.1.3"
ARCH=$(uname -m | sed 's/x86_64/x86_64/;s/arm64/arm64/')
curl -sL "https://github.com/tddworks/asc-cli/releases/download/v${VERSION}/asc_${VERSION}_macOS_${ARCH}" \
-o /usr/local/bin/asc && chmod +x /usr/local/bin/ascyaml
- name: Install asc CLI
run: |
brew tap tddworks/tap
brew install asccli或者直接下载指定版本:
yaml
- name: Install asc CLI
run: |
VERSION="0.1.3"
ARCH=$(uname -m | sed 's/x86_64/x86_64/;s/arm64/arm64/')
curl -sL "https://github.com/tddworks/asc-cli/releases/download/v${VERSION}/asc_${VERSION}_macOS_${ARCH}" \
-o /usr/local/bin/asc && chmod +x /usr/local/bin/ascAuth Setup
身份验证设置
ascyaml
env:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_PRIVATE_KEY: ${{ secrets.ASC_PRIVATE_KEY }} # PEM content, NOT a pathRequired GitHub Secrets:
| Secret | Value |
|---|---|
| App Store Connect API Key ID (e.g. |
| Issuer ID (UUID format) |
| Full PEM content of the |
To get the PEM content from your file:
.p8bash
cat AuthKey_XXXXXX.p8 | pbcopy # paste as the secret valueascyaml
env:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_PRIVATE_KEY: ${{ secrets.ASC_PRIVATE_KEY }} # PEM内容,而非文件路径所需的GitHub Secrets:
| 密钥名称 | 取值 |
|---|---|
| App Store Connect API密钥ID(例如 |
| 发行者ID(UUID格式) |
| |
从文件获取PEM内容的方法:
.p8bash
cat AuthKey_XXXXXX.p8 | pbcopy # 复制后粘贴为密钥值Core Commands
核心命令
bash
undefinedbash
undefined1. Upload IPA (auto-detects iOS from .ipa, macOS from .pkg)
1. 上传IPA(自动从.ipa识别iOS,从.pkg识别macOS)
asc builds upload
--app-id $APP_ID
--file MyApp.ipa
--version $VERSION
--build-number $BUILD_NUMBER
--wait # blocks until COMPLETE or FAILED
--app-id $APP_ID
--file MyApp.ipa
--version $VERSION
--build-number $BUILD_NUMBER
--wait # blocks until COMPLETE or FAILED
asc builds upload
--app-id $APP_ID
--file MyApp.ipa
--version $VERSION
--build-number $BUILD_NUMBER
--wait # 阻塞直至处理完成或失败
--app-id $APP_ID
--file MyApp.ipa
--version $VERSION
--build-number $BUILD_NUMBER
--wait # 阻塞直至处理完成或失败
2. Get the processed build ID
2. 获取处理后的构建ID
BUILD_ID=$(asc builds list --app-id $APP_ID --pretty | jq -r '.data[0].id')
BUILD_ID=$(asc builds list --app-id $APP_ID --pretty | jq -r '.data[0].id')
3. TestFlight: add to beta group
3. TestFlight:添加至测试组
asc builds add-beta-group --build-id $BUILD_ID --beta-group-id $GROUP_ID
asc builds add-beta-group --build-id $BUILD_ID --beta-group-id $GROUP_ID
4. TestFlight: set "What's New" notes
4. TestFlight:设置“新功能介绍”说明
asc builds update-beta-notes
--build-id $BUILD_ID
--locale en-US
--notes "Bug fixes and improvements."
--build-id $BUILD_ID
--locale en-US
--notes "Bug fixes and improvements."
asc builds update-beta-notes
--build-id $BUILD_ID
--locale en-US
--notes "修复Bug并优化体验。"
--build-id $BUILD_ID
--locale en-US
--notes "修复Bug并优化体验。"
5. App Store: link build to version
5. App Store:将构建关联至版本
VERSION_ID=$(asc versions list --app-id $APP_ID --pretty | jq -r '.data[0].id')
asc versions set-build --version-id $VERSION_ID --build-id $BUILD_ID
VERSION_ID=$(asc versions list --app-id $APP_ID --pretty | jq -r '.data[0].id')
asc versions set-build --version-id $VERSION_ID --build-id $BUILD_ID
6. App Store: gate — verify all checks pass before submitting
6. App Store:提交前检查——验证所有检查项通过后再提交
READINESS=$(asc versions check-readiness --version-id $VERSION_ID)
IS_READY=$(echo "$READINESS" | jq -r '.data[0].isReadyToSubmit')
if [ "$IS_READY" != "true" ]; then
echo "Version is NOT ready to submit:"
echo "$READINESS" | jq '.data[0] | {stateCheck, buildCheck, pricingCheck}'
exit 1
fi
READINESS=$(asc versions check-readiness --version-id $VERSION_ID)
IS_READY=$(echo "$READINESS" | jq -r '.data[0].isReadyToSubmit')
if [ "$IS_READY" != "true" ]; then
echo "版本尚未准备好提交:"
echo "$READINESS" | jq '.data[0] | {stateCheck, buildCheck, pricingCheck}'
exit 1
fi
7. App Store: submit for review
7. App Store:提交审核
asc versions submit --version-id $VERSION_ID
undefinedasc versions submit --version-id $VERSION_ID
undefinedFinding Your IDs
查找各类ID
bash
undefinedbash
undefinedApp ID (do this once, store as a secret or env var)
App ID(执行一次,存储为密钥或环境变量)
asc apps list --pretty | jq -r '.data[] | "(.name): (.id)"'
asc apps list --pretty | jq -r '.data[] | "(.name): (.id)"'
Beta group ID
Beta测试组ID
asc testflight groups list --app-id $APP_ID --pretty | jq -r '.data[0].id'
asc testflight groups list --app-id $APP_ID --pretty | jq -r '.data[0].id'
Current version ID (latest editable version)
当前版本ID(最新可编辑版本)
asc versions list --app-id $APP_ID --pretty | jq -r '.data[0].id'
undefinedasc versions list --app-id $APP_ID --pretty | jq -r '.data[0].id'
undefined