Merge branch 'feature/iCloudSyncV2' into develop #1164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Upload Provenance | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
env: | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
SWIFT_PACKAGE_ALLOW_WRITING_TO_DIRECTORY: ${{ github.workspace }} | |
jobs: | |
build: | |
name: Build and upload Provenance | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- Provenance-Release | |
- ProvenanceTV-Release | |
- "Provenance-XL Release" | |
- "Provenance-Lite Release" | |
- Provenance-UnderDevelopment | |
include: | |
- target: Provenance-Release | |
sdk: iphoneos | |
scheme: Provenance-Release | |
APP_NAME: Provenance | |
IPA_NAME: Provenance | |
- target: ProvenanceTV-Release | |
sdk: appletvos | |
scheme: ProvenanceTV-Release | |
APP_NAME: Provenance | |
IPA_NAME: ProvenanceTV | |
- target: Provenance-Release | |
sdk: appletvos | |
scheme: Provenance-Release | |
APP_NAME: Provenance | |
IPA_NAME: Provenance-tvOS | |
- target: "Provenance-XL Release" | |
sdk: iphoneos | |
scheme: "Provenance-XL Release" | |
APP_NAME: Provenance-XL | |
IPA_NAME: Provenance-XL | |
- target: "Provenance-Lite Release" | |
sdk: iphoneos | |
scheme: "Provenance-Lite Release" | |
APP_NAME: Provenance-Lite | |
IPA_NAME: Provenance-Lite | |
- target: Provenance-UnderDevelopment | |
sdk: iphoneos | |
scheme: Provenance-UnderDevelopment | |
APP_NAME: Provenance-UnderDevelopment | |
IPA_NAME: Provenance-UnderDevelopment | |
# - target: macOS | |
# sdk: macosx | |
# scheme: Provenance | |
runs-on: 'macos-latest' | |
timeout-minutes: 300 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
# - name: Install Xcode | |
# uses: maxim-lobanov/setup-xcode@v1 | |
# with: | |
# xcode-version: ${{ matrix.version }} | |
- name: Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1.6.0 | |
with: | |
xcode-version: '16.0' | |
# xcode-select-path: /Applications/Xcode_${{ matrix.version }}.app/Contents/Developer | |
- uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
- name: Install dependencies | |
run: brew install ldid | |
- name: Cache DerivedData | |
uses: irgaly/xcode-cache@v1 | |
with: | |
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} | |
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- | |
- name: Install Swift Package Cache | |
run: | | |
mkdir -p ${{ env.SWIFT_PACKAGE_ALLOW_WRITING_TO_DIRECTORY }} | |
chmod -R u+w ${{ env.SWIFT_PACKAGE_ALLOW_WRITING_TO_DIRECTORY }} | |
- name: Activate IDESkipMacroFingerprintValidation | |
run: | | |
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES | |
# - name: Import Codesign Certificates | |
# uses: apple-actions/import-codesign-certs@v1 | |
# with: | |
# p12-file-base64: ${{ secrets.CERT_P12 }} | |
# p12-password: ${{ secrets.P12_PASS }} | |
#- name: Import Codesign Certificates | |
# uses: apple-actions/import-codesign-certs@v2 | |
# with: | |
# p12-file-base64: ${{ secrets.CERT_P12 }} | |
# p12-password: ${{ secrets.P12_PASS }} | |
- name: Build Provenance | |
run: | | |
xcodebuild -configuration Release \ | |
-workspace Provenance.xcworkspace \ | |
-scheme "${{ matrix.scheme }}" \ | |
-sdk ${{ matrix.sdk }} \ | |
-skipPackagePluginValidation \ | |
-skipMacroValidation \ | |
archive \ | |
-archivePath ./archive \ | |
CODE_SIGNING_REQUIRED=NO \ | |
AD_HOC_CODE_SIGNING_ALLOWED=YES \ | |
CODE_SIGNING_ALLOWED=NO \ | |
SWIFT_PACKAGE_ALLOW_WRITING_TO_DIRECTORY=${{ env.SWIFT_PACKAGE_ALLOW_WRITING_TO_DIRECTORY }} \ | |
DEVELOPMENT_TEAM=S32Z3HMYVQ \ | |
ORG_IDENTIFIER=org.provenance-emu \ | |
| xcpretty && exit ${PIPESTATUS[0]} | |
# - name: Build Provenance | |
# run: | | |
# rm -rf ~/Library/Developer/Xcode/DerivedData/ | |
# rm ./Provenance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved | |
# rm ./Provenance.xcworkspace/xcshareddata/swiftpm/Package.resolved | |
# xcodebuild -workspace Provenance.xcworkspace -scheme Provenance-Release -sdk iphoneos archive -archivePath ./archive CODE_SIGNING_REQUIRED=NO AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGNING_ALLOWED=NO DEVELOPMENT_TEAM=XYZ0123456 ORG_IDENTIFIER=org.provenance-emu | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Fakesign app | |
run: | | |
#rm -rf archive.xcarchive/Products/Applications/${{ matrix.APP_NAME }}.app/Frameworks/*.framework/Frameworks/ | |
ldid -SProvenance/Provenance.entitlements archive.xcarchive/Products/Applications/${{ matrix.APP_NAME }}.app/${{ matrix.APP_NAME }} | |
- name: Convert to IPA | |
run: | | |
mkdir Payload | |
cp -pR "archive.xcarchive/Products/Applications/${{ matrix.APP_NAME }}.app" "Payload/${{ matrix.IPA_NAME }}.app" | |
zip -r "${{ matrix.IPA_NAME }}.ipa" Payload | |
# - name: Codesign IPA | |
# uses: mmaetzler/ios-resign-action@d3c2e4cb930bc7edf89894af7af622d3c0d5b571 | |
# with: | |
# ipa_path: "${{ matrix.IPA_NAME }}.ipa" | |
# mobileprovision: ${{ secrets.MOBILEPROVISION }} | |
# cert_p12: ${{ secrets.CERT_P12 }} | |
# p12_pass: ${{ secrets.P12_PASS }} | |
# signing_identity: ${{ secrets.SIGNING_IDENTITY }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: "${{ matrix.IPA_NAME }}.ipa" | |
path: "${{ matrix.IPA_NAME }}.ipa" | |
# - name: Upload IPA to S3 | |
# if: ${{ github.branch == 'develop' }} | |
# uses: ebuckthal/s3-upload-artifact@v7 | |
# with: | |
# bucket: 'sh-sysops' | |
# key: ${AWS_SECRET_ACCESS_KEY} | |
# path: 'Provenance.ipa' | |
# - name: Upload IPA to App Center | |
# uses: wzieba/AppCenter-Github-Action@v1 | |
# if: ${{ github.branch == 'develop' }} | |
# with: | |
# appName: wzieba/Sample-App | |
# token: ${{secrets.APP_CENTER_TOKEN}} | |
# group: Testers | |
# file: Provenance.ipa | |
# notifyTesters: true | |
# debug: false |