Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Babyyoda777 authored Jul 3, 2024
1 parent dde9d37 commit ce4cd62
Showing 1 changed file with 22 additions and 38 deletions.
60 changes: 22 additions & 38 deletions .github/workflows/build.yml
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

0 comments on commit ce4cd62

Please sign in to comment.