Skip to content

Commit

Permalink
Try again with ios ci
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Jul 9, 2023
1 parent d1375d0 commit f5dcefe
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/ios-test-flight-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: "build-test"
on:
push:
tags:
- '*-ios'

jobs:
build:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2

- name: import certs
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}

- name: download provisioning profiles
uses: apple-actions/download-provisioning-profiles@v1
with:
bundle-id: ${{ secrets.BUNDLE_ID }}
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

- name: build archive
env:
PROJECT_DIR: iosApp
SCHEME: FeedFlow
CONFIGURATION: Release
SDK: iphoneos
run: |
cd ${PROJECT_DIR}
xcrun xcodebuild \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${CONFIGURATION}" \
-sdk "${SDK}" \
-parallelizeTargets \
-showBuildTimingSummary \
-disableAutomaticPackageResolution \
-derivedDataPath "${RUNNER_TEMP}/Build/DerivedData" \
-archivePath "${RUNNER_TEMP}/Build/Archives/${SCHEME}.xcarchive" \
-resultBundlePath "${RUNNER_TEMP}/Build/Artifacts/${SCHEME}.xcresult" \
-destination "generic/platform=iOS" \
DEVELOPMENT_TEAM="${{ secrets.APPSTORE_TEAM_ID }}" \
PRODUCT_BUNDLE_IDENTIFIER="${{ secrets.BUNDLE_ID }}" \
CODE_SIGN_STYLE="Manual" \
PROVISIONING_PROFILE_SPECIFIER="${{ secrets.DEV_PROVISIONING_PROFILE_NAME }}" \
archive
- name: "Generate ExportOptions.plist"
run: |
cat <<EOF > ${RUNNER_TEMP}/Build/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>destination</key>
<string>export</string>
<key>method</key>
<string>app-store</string>
<key>signingStyle</key>
<string>manual</string>
<key>generateAppStoreInformation</key>
<true/>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>${{ secrets.APPSTORE_TEAM_ID }}</string>
<key>uploadSymbols</key>
<true/>
<key>provisioningProfiles</key>
<dict>
<key>${{ secrets.BUNDLE_ID }}</key>
<string>${{ secrets.DIST_PROVISIONING_PROFILE_NAME }}</string>
</dict>
</dict>
</plist>
EOF
- id: export_archive
name: export archive
env:
SCHEME: FeedFlow
run: |
xcrun xcodebuild \
-exportArchive \
-exportOptionsPlist "${RUNNER_TEMP}/Build/ExportOptions.plist" \
-archivePath "${RUNNER_TEMP}/Build/Archives/${SCHEME}.xcarchive" \
-exportPath "${RUNNER_TEMP}/Build/Archives/${SCHEME}.xcarchive/${SCHEME}.ipa" \
PRODUCT_BUNDLE_IDENTIFIER="${{ secrets.BUNDLE_ID }}"
echo "ipa_path=${RUNNER_TEMP}/Build/Archives/${SCHEME}.xcarchive/${SCHEME}.ipa/${SCHEME}.ipa" >> $GITHUB_OUTPUT
- uses: Apple-Actions/upload-testflight-build@v1
with:
app-path: ${{ steps.export_archive.outputs.ipa_path }}
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

0 comments on commit f5dcefe

Please sign in to comment.