- Creates workflow for building without Apple Developer Program - Uses Apple-Actions for certificate import - Outputs .app file as artifact for sideloading See ADHOC_BUILD_GUIDE.md for setup instructions
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
name: Build iOS Ad-Hoc
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd apps/mobile
|
|
bun install
|
|
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.3'
|
|
|
|
- name: Install CocoaPods
|
|
run: |
|
|
cd apps/mobile/ios
|
|
pod install
|
|
|
|
- name: Import Apple Certificate
|
|
uses: Apple-Actions/import-codesign-certificates@v2
|
|
with:
|
|
p12-file-base64: ${{ secrets.CERTIFICATE_P12 }}
|
|
p12-password: ${{ secrets.CERT_P12_PASSWORD }}
|
|
|
|
- name: Add Provisioning Profile
|
|
run: |
|
|
PROFILE_NAME=${{ secrets.PROFILE_NAME }}
|
|
PROFILE_BASE64=${{ secrets.PROVISIONING_PROFILE }}
|
|
|
|
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
|
echo "$PROFILE_BASE64" | base64 -d -o "$HOME/Library/MobileDevice/Provisioning Profiles/$PROFILE_NAME.mobileprovision"
|
|
|
|
- name: Build iOS
|
|
run: |
|
|
cd apps/mobile
|
|
xcodebuild -workspace ios/Bagsy.xcworkspace \
|
|
-scheme Bagsy \
|
|
-configuration Debug \
|
|
-destination generic/platform=iOS \
|
|
CODE_SIGN_IDENTITY="${{ secrets.CERT_NAME }}" \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
build
|
|
|
|
- name: Find and upload app
|
|
run: |
|
|
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "Bagsy.app" -type d | head -1)
|
|
echo "Found app at: $APP_PATH"
|
|
zip -r bagsy-app.zip "$APP_PATH"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bagsy-adhoc-build
|
|
path: bagsy-app.zip
|