Merge pull request #21 from SNURhythm/chore/improve-ci-cd #21
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 Generate IPA | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
buildForAllSupportedPlatforms: | |
name: Build for ${{ matrix.targetPlatform }} | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
targetPlatform: | |
- iOS # Build an iOS player. | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ matrix.targetPlatform }} | |
restore-keys: Library- | |
- uses: game-ci/[email protected] | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: ${{ matrix.targetPlatform }} | |
cacheUnityInstallationOnMac: true | |
- name: Generate IPA | |
if: matrix.targetPlatform == 'iOS' | |
run: | | |
ls | |
cd build/iOS/iOS | |
mkdir archive | |
xcversion select 14.3.1 | |
xcodebuild -scheme "Unity-iPhone" -target "Unity-iPhone" -sdk iphoneos -archivePath archive/iBMS.xcarchive -configuration Release archive CODE_SIGN_IDENTITY="" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | |
mkdir Payload | |
cp -r archive/iBMS.xcarchive/Products/Applications/iBMS.app/ ./Payload/iBMS.app | |
rm -f ./Payload/.DS_Store | |
zip -r iBMS.ipa ./Payload | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: IPA | |
path: build/iOS/iOS/iBMS.ipa |