Skip to content

[video-v2.4.33 正式版] #176

[video-v2.4.33 正式版]

[video-v2.4.33 正式版] #176

name: iOS Release CI
on:
release:
types: [published]
jobs:
Build:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: pod cache
uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install GPG
run: brew install gnupg
- name: List available Xcode versions
run: ls /Applications | grep Xcode
# - name: Select Xcode
# run: sudo xcode-select -switch /Applications/Xcode_12.app && /usr/bin/xcodebuild -version
- name: Get Product Line
run: |
rtt=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "curr_tag=$rtt" >> $GITHUB_ENV
############# Link ##################
- name: Decrypt Link prerelease keychain
if: ${{ !contains(env.curr_tag, 'video') && github.event.release.prerelease }}
run: sh .github/script/import_provisioning.sh ReleaseBeta
env:
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
P12_EXPORT_CCHARLESREN_PASSWORD: ${{ secrets.IOT_P12_EXPORT_PASSWORD }}
- name: Decrypt Link release keychain
if: ${{ !contains(env.curr_tag, 'video') && !github.event.release.prerelease }}
run: sh .github/script/import_provisioning.sh Release
env:
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
P12_EXPORT_CCHARLESREN_PASSWORD: ${{ secrets.IOT_P12_EXPORT_PASSWORD }}
- name: Build Link archive
if: ${{!contains(env.curr_tag, 'video')}}
run: |
sh .github/script/archive.sh Release
zip -q -r -o "LinkApp.zip" LinkApp.ipa LinkApp.xcarchive/dSYMs/LinkApp.app.dSYM
gpg --batch --passphrase "$PROVISIONING_PASSWORD" -c LinkApp.zip
env:
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: Upload LinkApp Asset
if: ${{!contains(env.curr_tag, 'video')}}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: LinkApp.zip.gpg
asset_name: LinkApp.zip.gpg
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: upload dSYM
# if: ${{!contains(env.curr_tag, 'video')}}
# run: ./Pods/FirebaseCrashlytics/upload-symbols -gsp ./Source/LinkApp/Supporting\ Files/GoogleService-Info.plist -p ios ./LinkApp.xcarchive/dSYMs/LinkApp.app.dSYM
############# Video ##################
- name: video Decrypt prerelease keychain
if: ${{contains(env.curr_tag, 'video')}}
run: sh .github/script/import_provisioning.sh Debug
env:
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
P12_EXPORT_CCHARLESREN_PASSWORD: ${{ secrets.IOT_P12_EXPORT_PASSWORD }}
- name: video Build Archive
if: ${{contains(env.curr_tag, 'video')}}
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export GIT_BRANCH_IMAGE_VERSION=$VERSION
/usr/local/bin/pod --version
/usr/local/bin/pod update --verbose
sh .github/script/sdkDemoArchive.sh Debug
zip -q -r -o "LinkSDKDemo.zip" LinkSDKDemo.ipa LinkSDKDemo.xcarchive/dSYMs/LinkSDKDemo.app.dSYM
gpg --batch --passphrase "$PROVISIONING_PASSWORD" -c LinkSDKDemo.zip
ls -l
env:
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: video Upload Asset
if: ${{contains(env.curr_tag, 'video')}}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: LinkSDKDemo.zip.gpg
asset_name: LinkSDKDemo.zip.gpg
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: video install fir
if: ${{contains(env.curr_tag, 'video')}}
run: gem install fir-cli
- name: video deploy to fir
if: ${{contains(env.curr_tag, 'video')}}
run: |
rc=$(git rev-parse --short HEAD)
rl=$(git log --pretty=format:"%s" $rc -1)
fir publish LinkSDKDemo.ipa -T $RELEASE_PGYER_API_KEY -c "$rl" --oversea_turbo --force_pin_history -V
env:
RELEASE_PGYER_API_KEY: ${{ secrets.IOT_FIRIM_API_TOKEN }}
# - name: video upload dSYM
# if: ${{contains(env.curr_tag, 'video')}}
# run: |
# ./Pods/FirebaseCrashlytics/upload-symbols -gsp ./Source/LinkSDKDemo/Supporting\ Files/GoogleService-Info.plist -p ios ./LinkSDKDemo.xcarchive/dSYMs/LinkSDKDemo.app.dSYM