Skip to content

Build iOS app

Build iOS app #45

name: Build iOS app
on:
workflow_dispatch:
inputs:
build_type:
description: '`debug` or `release`'
required: true
default: 'debug'
jobs:
build-ios:
runs-on: macos-latest
name: Build iOS application
environment: 'es-fastlane-match'
steps:
- name: Install the Apple certificate and provisioning profile
uses: eclipsesource/prepare-for-signing-action@v1
with:
app_identifier: 'com.eclipsesource.tabris.remote'
profile_type: ${{ github.event.inputs.build_type == 'release' && 'appstore' || 'development' }}
match_git_url: ${{ vars.TABRIS_IOS_MATCH_GIT_URL }}
match_git_branch: ${{ vars.TABRIS_IOS_MATCH_GIT_BRANCH }}
match_git_ssh_key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
match_password: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
fastlane_team_id: ${{ vars.TABRIS_IOS_FASTLANE_TEAM_ID }}
fastlane_user: ${{ vars.TABRIS_IOS_FASTLANE_USER }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install tabris-cli
run: npm install -g tabris-cli
- name: Install application dependencies
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run --if-present prepare
npm install
- name: Build application
env:
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_IOS_BUILD_KEY }}
run: |
tabris build ios --${{ github.event.inputs.build_type }} --device --verbose
- name: Prepare artifacts for archival
run: |
mkdir -p artifacts
printenv | grep GITHUB_ > artifacts/env-gha
cp -R \
"$(find . -iname "*.app.dSYM")" \
"$(find . -iname "*.ipa")" \
artifacts
tar cf artifacts.tar artifacts
- name: Archive metadata
uses: actions/upload-artifact@v3
with:
name: artifacts.tar
path: artifacts.tar
retention-days: 30
- name: AppStore Upload
if: ${{ github.event.inputs.build_type == 'release' }}
env:
FASTLANE_USER: ${{ vars.TABRIS_IOS_FASTLANE_USER }}
FASTLANE_APP_SPECIFIC_PASSWORD: ${{ secrets.TABRIS_IOS_FASTLANE_APP_SPECIFIC_PASSWORD }}
run: |
xcrun altool --upload-app --type ios \
--file "$(find ./artifacts/ -iname "*.ipa")" \
--username $FASTLANE_USER \
--password $FASTLANE_APP_SPECIFIC_PASSWORD