2022-11-24 06:03:59 +00:00
|
|
|
# This workflow build iOS App as a .ipa file and upload it to TestFlight.
|
|
|
|
|
|
|
|
name: Build-iOS
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
git-ref:
|
|
|
|
description: "Release Git Ref (Which branch or tag to build?)"
|
|
|
|
required: true
|
|
|
|
default: "master"
|
|
|
|
|
|
|
|
env:
|
|
|
|
CLOJURE_VERSION: '1.10.1.763'
|
2023-02-21 15:07:35 +00:00
|
|
|
NODE_VERSION: '18'
|
2022-11-24 06:03:59 +00:00
|
|
|
JAVA_VERSION: '11'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-app:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository
|
2023-01-21 13:10:19 +00:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2022-11-24 06:03:59 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.inputs.git-ref }}
|
|
|
|
|
|
|
|
- name: Install Node.js, NPM and Yarn
|
2022-11-30 05:21:57 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-11-24 06:03:59 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
|
|
|
|
- name: Setup Java JDK
|
2022-11-30 05:21:57 +00:00
|
|
|
uses: actions/setup-java@v3
|
2022-11-24 06:03:59 +00:00
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
|
2022-11-24 07:35:03 +00:00
|
|
|
- name: Cache clojure deps
|
2022-11-30 05:21:57 +00:00
|
|
|
uses: actions/cache@v3
|
2022-11-24 07:35:03 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.m2/repository
|
|
|
|
~/.gitlibs
|
|
|
|
key: ${{ runner.os }}-clojure-lib-${{ hashFiles('**/deps.edn') }}
|
|
|
|
|
2022-11-24 06:03:59 +00:00
|
|
|
- name: Setup clojure
|
2022-11-30 05:21:57 +00:00
|
|
|
uses: DeLaGuardo/setup-clojure@10.1
|
2022-11-24 06:03:59 +00:00
|
|
|
with:
|
|
|
|
cli: ${{ env.CLOJURE_VERSION }}
|
|
|
|
|
|
|
|
- name: Setup build tools
|
|
|
|
run: brew install fastlane
|
|
|
|
|
|
|
|
- name: Set Build Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "ENABLE_FILE_SYNC_PRODUCTION=true" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Compile CLJS
|
|
|
|
run: yarn install && yarn release-app
|
2022-12-19 14:20:50 +00:00
|
|
|
env:
|
|
|
|
LOGSEQ_SENTRY_DSN: ${{ secrets.LOGSEQ_SENTRY_DSN }}
|
|
|
|
LOGSEQ_POSTHOG_TOKEN: ${{ secrets.LOGSEQ_POSTHOG_TOKEN }}
|
2022-11-24 06:03:59 +00:00
|
|
|
|
|
|
|
- name: Sync static build files
|
|
|
|
run: rsync -avz --exclude node_modules --exclude '*.js.map' --exclude android ./static/ ./public/static/
|
|
|
|
|
|
|
|
- name: Prepare iOS build
|
|
|
|
run: npx cap sync ios
|
|
|
|
|
|
|
|
- name: Build and upload iOS app
|
|
|
|
run: fastlane beta
|
|
|
|
working-directory: ./ios/App
|
|
|
|
env:
|
|
|
|
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
|
|
|
|
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
|
|
|
|
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
|
|
|
|
APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64: true
|
|
|
|
SLACK_URL: ${{ secrets.SLACK_URL }}
|
2022-11-24 07:35:03 +00:00
|
|
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
|
|
|
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
|
2022-11-30 05:21:57 +00:00
|
|
|
|
|
|
|
- name: Save Static File
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: static
|
|
|
|
path: static
|