Skip to content

Commit

Permalink
Merge pull request #1 from niyajali/create-action
Browse files Browse the repository at this point in the history
feat: Added iOS build action
  • Loading branch information
niyajali authored Dec 14, 2024
2 parents 973583a + 4a9ebfd commit 790586b
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 1 deletion.
125 changes: 125 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
### AndroidStudio template
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle
.gradle/
build/

# Signing files
.signing/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Patch
gen-external-apklibs

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iml
*.iws
/out/

# User-specific configurations
.idea/

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Kotlin template
# Compiled class file

# Log file

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)

# Package Files #
*.jar
*.nar
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
replay_pid*

72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,71 @@
# KMP-Build-Ios-App
# KMP Build iOS App

This GitHub Action automates the process of building and archiving an iOS application using Fastlane. It handles the complete build workflow and artifact storage.

## Features

- Automated iOS app building
- Fastlane integration
- Build artifact compression and storage
- Optimized for CI/CD pipelines

## Prerequisites

- iOS project with Xcode configuration
- Fastlane setup in the repository
- Valid iOS certificates and provisioning profiles
- Proper Xcode project structure

## Usage

```yaml
name: KMP iOS Build and Archive

on:
workflow_dispatch:

jobs:
build_ios_app:
name: Build iOS App
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Build iOS App
uses: openMF/[email protected]
```
## Workflow Details
1. **Environment Setup**
- Configures Ruby environment
- Sets up Fastlane with required plugins
- Configures bundler for dependency management
2. **Build Process**
- Executes Fastlane commands to build the iOS application
- Generates IPA file
- Handles build configuration through Fastlane
3. **Artifact Management**
- Uploads built IPA file as an artifact
- Applies high compression (level 9)
- Sets 1-day retention period
- Captures all IPA files in the build directory
## Requirements
- GitHub Actions runner with macOS
- Xcode installation
- Valid iOS development certificates
- Fastlane configuration in the repository
## Dependencies
- Ruby (installed via setup-ruby action)
- Bundler 2.2.27
- Fastlane with following plugins:
- firebase_app_distribution
- increment_build_number
34 changes: 34 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'KMP Build iOS App'
description: 'Build and Archive iOS application'
author: 'Mifos Initiative'
branding:
icon: 'play'
color: 'gray-dark'

runs:
using: composite
steps:
- name: Configure Ruby
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
with:
bundler-cache: true

- name: Install Fastlane
shell: bash
run: |
gem install bundler:2.2.27
bundle install --jobs 4 --retry 3
bundle exec fastlane add_plugin firebase_app_distribution
bundle exec fastlane add_plugin increment_build_number
- name: Build iOS App
shell: bash
run: bundle exec fastlane ios build_ios

- name: Upload iOS Artifact
uses: actions/upload-artifact@v4
with:
name: ios-app
retention-days: 1
compression-level: 9
path: '**/*.ipa'

0 comments on commit 790586b

Please sign in to comment.