-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dde9d37
commit ce4cd62
Showing
1 changed file
with
22 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,44 @@ | ||
name: Unsigned IPA Build | ||
name: Build and Export Unsigned IPA | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-14 | ||
|
||
strategy: | ||
matrix: | ||
platform: ['iOS'] | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
ruby-version: '2.7' | ||
|
||
- name: Fetch Commit Info | ||
id: commitinfo | ||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Install CocoaPods | ||
run: | | ||
gem install cocoapods | ||
pod install --project-directory=App | ||
- name: Setup Xcode | ||
- name: Set up Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
xcode-version: '15.0.0' | ||
|
||
- name: Resolve Swift Package Dependencies | ||
- name: Build and Export IPA | ||
run: | | ||
swift package resolve | ||
xcodebuild clean -project App/Mochi.xcodeproj -scheme Mochi -configuration Release | ||
xcodebuild archive -project App/Mochi.xcodeproj -scheme Mochi -configuration Release -archivePath $PWD/build/Mochi.xcarchive | ||
xcodebuild -exportArchive -archivePath $PWD/build/Mochi.xcarchive -exportOptionsPlist App/exportOptions.plist -exportPath $PWD/build | ||
- name: Build Unsigned IPA | ||
run: | | ||
xcodebuild clean -project "./App/Mochi.xcodeproj" \ | ||
-scheme Mochi \ | ||
-configuration Release \ | ||
-destination generic/platform=${{ matrix.platform }} \ | ||
archive -archivePath "build/Mochi.${{ matrix.platform }}.xcarchive" \ | ||
CODE_SIGN_IDENTITY="" \ | ||
CODE_SIGNING_REQUIRED=NO \ | ||
CODE_SIGNING_ALLOWED=NO \ | ||
-skipMacroValidation \ | ||
-verbose | ||
xcodebuild -exportArchive -archivePath "build/Mochi.${{ matrix.platform }}.xcarchive" \ | ||
-exportOptionsPlist exportOptions.plist \ | ||
-exportPath "build" | ||
- name: Package ${{ matrix.platform }} | ||
run: ./package.sh "build/Mochi.${{ matrix.platform }}.xcarchive" ${{ matrix.platform }} "Mochi.${{ steps.commitinfo.outputs.sha_short }}.${{ matrix.platform }}" | ||
- name: Upload Unsigned IPA Artifact | ||
- name: Upload IPA as Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Mochi.${{ steps.commitinfo.outputs.sha_short }}.${{ matrix.platform }}.ipa | ||
path: build/*.ipa | ||
if-no-files-found: error | ||
name: Mochi.ipa | ||
path: build/Mochi.ipa |