ios - GitHub Action iOS CD not show on TestFlight
问题描述
I'm using GitHub Action only and the scripts is running fine, but I don't see the build on TestFlight. Did I miss something in the script? I'm following this tutorial for the setup. Thank you.
Deploying.yml
name: Deploying
on: [push]
jobs:
deploy:
name: Deploying to Testflight
runs-on: macOS-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install gpg
run: brew install gnupg
- name: Setup provisioning profile
env:
IOS_KEYS: ${{ secrets.IOS_KEYS }}
run: chmod 755 ./.github/secrets/decrypt_secrets.sh
- name: Archiving project
env:
PR_NUMBER: $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
run: chmod 755 ./.github/scripts/archive_app.sh
- name: Exporting .ipa
run: chmod 755 ./.github/scripts/export_ipa.sh
- name: Publishing app
if: success()
env:
APPLEID_USERNAME: ${{ secrets.APPLEID_USERNAME }}
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
run: chmod 755 ./.github/scripts/publish_testflight.sh
decrypt_secrets.sh
#!/bin/sh
set -eo pipefail
# Decrypt the files
# --batch to prevent interactive command --yes to assume "yes" for questions
gpg --quiet --batch --yes --decrypt --passphrase="$IOS_KEYS" --output ./.github/secrets/Demo.mobileprovision ./.github/secrets/Demo.mobileprovision.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$IOS_KEYS" --output ./.github/secrets/Certificates.p12 ./.github/secrets/Certificates.p12.gpg
# Install the provisioning profiles
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp ./.github/secrets/Demo.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/Demo.mobileprovision
security create-keychain -p "" build.keychain
security import ./.github/secrets/Certificates.p12 -t agg -k ~/Library/Keychains/build.keychain -P "" -A
# install distribution cert and key
security list-keychains -s ~/Library/Keychains/build.keychain
security default-keychain -s ~/Library/Keychains/build.keychain
security unlock-keychain -p "" ~/Library/Keychains/build.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain
archive_app.sh
#!/bin/bash
set -eo pipefail
xcodebuild -workspace Demo.xcworkspace \
-scheme Demo \
-sdk iphoneos \
-configuration Release \
-archivePath $PWD/build/Demo.xcarchive \
clean archive | xcpretty
export_ipa.sh
#!/bin/bash
set -eo pipefail
xcodebuild -archivePath $PWD/build/Demo.xcarchive \
-exportOptionsPlist Demo/exportOptions.plist \
-exportPath $PWD/build \
-allowProvisioningUpdates \
-exportArchive | xcpretty
publish_testflight.sh
#!/bin/bash
set -eo pipefail
xcrun altool --upload-app \
--type ios \
--file build/Demo.ipa \
--username "$APPLEID_USERNAME" \
--password "$APPLEID_PASSWORD" --verbose
Demo/Demo/exportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>uploadBitcode</key>
<true/>
<key>uploadSymbols</key>
<true/>
<key>provisioningProfiles</key>
<dict>
<key>com.app.Demo</key>
<string>match AppStore com.app.Demo</string>
</dict>
</dict>
</plist>
解决方案
推荐阅读
- typescript - 用 Hugo 管道编译打字稿?
- mongodb - 如何在mongodb的响应中排除密码字段?
- r - 如何将一个变量的内容复制到 R 中的另一个变量中?
- php - production.ERROR:方法 [getContent] 在视图中不存在
- php - 如何显示这些记录特定于它们包含的数据?
- php - 在 127.0.0.1:8000 上使用 PHP 内置服务器
- python - 如果文本文件中的前 10 个字符匹配 - 写入新文件
- javascript - 如何使用 JavaScript 触发 jQuery 更改功能?
- formatting - 如何使用 PHPExcel 将百分比数字格式化为 Excel 百分比?
- javascript - three.js - “未捕获的类型错误:无法读取未定义的属性 'center' - three.js:6754”当我添加另一个网格时正在发生