Skip to content

Use custom action

Use custom action #24

Workflow file for this run

name: Build and Generate IPA
on:
push:
branches:
- chore/self-hosted-action
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: self-hosted
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: VioletXF/unity-builder@fix/macos-unity-existence-check
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