asc-appstore-release について
GitHub Actions で `asc` CLI を使った App Store リリースを自動化するスキルです。ソースからのビルドとアップロード、または既成の IPA/PKG のアップロードに加え、TestFlight と提出前の確認を扱います。
主な機能
- 01ソースからのビルド、書き出し、アップロード
- 02既成 IPA または PKG のアップロード
- 03ビルドの TestFlight グループへの追加
- 04ベータ版リリースノートの設定
- 05準備状況の確認とバージョン提出
活用シーン
- 01GitHub Actions での App Store リリース自動化
- 02署名済み iOS または macOS ビルドのアップロード
- 03TestFlight 経由でのビルド配布
- 04アプリ内購入を含むバージョンの提出
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ tddworks/ asc-cli-skills --skill asc-appstore-releaseインストール後、Claude Code で/asc-appstore-releaseを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
.DS_Storereferences/workflow-template.mdscripts/setup-mas-certs.sh詳細
GitHub Actions で asc を使って App Store にリリースする
ビルド設定に応じて、2 つの方法があります。
オプション A:ソースからアーカイブを作成 — asc がすべて(アーカイブ+書き出し+アップロード)を処理します
Xcode project
→ asc builds next-number # auto-resolve build number
→ asc builds archive --upload # archive, export, upload in one step
→ 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 review (--with-products for new IAPs/subscriptions)
オプション B:ビルド済み IPA をアップロード — 署名済みのバイナリ(Xcode、Fastlane などで作成済み)がある場合
Signed IPA/PKG (from your build step)
→ asc builds next-number # auto-resolve build number
→ 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 review (--with-products for new IAPs/subscriptions)
コピーしてそのまま使えるワークフローの全例については、workflow-template.md をご覧ください。
Mac App Store 証明書の設定
CI を初めて実行する前に、APPLE_MAS_CERTIFICATE_P12 と APPLE_MAS_CERTIFICATE_PASSWORD が必要です。
対話型セットアップスクリプトを実行します。
.claude/skills/asc-appstore-release/scripts/setup-mas-certs.sh
スクリプトで全体の仕組みを確認できます。
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
GitHub Actions に asc をインストールする
- name: Install asc CLI
run: |
brew tap tddworks/tap
brew install asccli
または、特定のバージョンを直接ダウンロードします。
- 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/asc
認証の設定
asc は環境変数から認証情報を自動的に読み込みます。
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 path
必要な GitHub シークレット:
| シークレット | 値 |
|---|---|
ASC_KEY_ID | App Store Connect API キー ID(例:6X3CMK22CY) |
ASC_ISSUER_ID | Issuer ID(UUID 形式) |
ASC_PRIVATE_KEY | .p8 ファイルの PEM 内容全体 |
.p8 ファイルから PEM 内容を取得するには:
cat AuthKey_XXXXXX.p8 | pbcopy # paste as the secret value
主なコマンド
オプション A:ソースからアーカイブを作成(asc のみを使うワークフローにおすすめ)
# 1. Get the next build number
BUILD_NUMBER=$(asc builds next-number --app-id $APP_ID --version $VERSION --platform ios)
# 2. Archive, export, and upload in one command
asc builds archive \
--scheme $SCHEME \
--platform ios \
--upload \
--app-id $APP_ID \
--version $VERSION \
--build-number $BUILD_NUMBER
# 3. Get the processed build ID
BUILD_ID=$(asc builds list --app-id $APP_ID --version $VERSION --platform ios | jq -r '.data[0].id')
オプション B:ビルド済み IPA/PKG をアップロード
# 1. Get the next build number
BUILD_NUMBER=$(asc builds next-number --app-id $APP_ID --version $VERSION --platform ios)
# 2. Upload IPA (auto-detects iOS from .ipa, macOS from .pkg)
asc builds upload \
--app-id $APP_ID \
--file MyApp.ipa \
--version $VERSION \
--build-number $BUILD_NUMBER \
--wait
# 3. Get the processed build ID
BUILD_ID=$(asc builds list --app-id $APP_ID --version $VERSION --platform ios | jq -r '.data[0].id')
共通の手順(どちらのオプションでも必要)
# 4. TestFlight: add to beta group
asc builds add-beta-group --build-id $BUILD_ID --beta-group-id $GROUP_ID
# 5. TestFlight: set "What's New" notes
asc builds update-beta-notes \
--build-id $BUILD_ID \
--locale en-US \
--notes "Bug fixes and improvements."
# 6. App Store: link build to version
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
# 7. App Store: gate — verify all checks pass before submitting
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
# 8. App Store: submit for review. --with-products also sends every READY_TO_SUBMIT
# in-app purchase and subscription in the same submission — required for first-time
# products, harmless otherwise. Preview with --dry-run.
asc versions submit --version-id $VERSION_ID --with-products
初回の IAP とサブスクリプションは、アプリのバージョンと合わせて審査を受ける必要があります。ドライラン、手順ごとの制御、Apple の却下理由の確認については、submit-with-products.md をご覧ください。
ID の確認方法
# App ID (do this once, store as a secret or env var)
asc apps list --pretty | jq -r '.data[] | "\(.name): \(.id)"'
# Beta group ID
asc testflight groups list --app-id $APP_ID --pretty | jq -r '.data[0].id'
# Current version ID (latest editable version)
asc versions list --app-id $APP_ID --pretty | jq -r '.data[0].id'