Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS Deployment #37

Merged
merged 4 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,37 @@ on:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-debug:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Build with Gradle
run: ./gradlew android:assembleDebug
run: ./gradlew composeApp:assembleDebug

build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -38,13 +45,15 @@ jobs:

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew android:assembleRelease
run: ./gradlew composeApp:assembleRelease

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -54,5 +63,6 @@ jobs:

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew android:check
run: ./gradlew composeApp:testDebugUnitTest
20 changes: 12 additions & 8 deletions .github/workflows/desktop-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: Desktop and Web CI

on:
push:
branches:
- main
pull_request:
branches:
- main

pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Build-Desktop:
runs-on: ubuntu-latest
Expand All @@ -23,11 +25,13 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Build with Gradle
run: ./gradlew desktop:assemble
run: ./gradlew composeApp:desktopJar

Build-Web:
runs-on: ubuntu-latest
Expand All @@ -52,4 +56,4 @@ jobs:
node-version: '10.x'

- name: Build with Gradle
run: ./gradlew jsApp:assemble
run: ./gradlew composeApp:jsJar
66 changes: 48 additions & 18 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,68 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: macos-latest
steps:
- name: Check Xcode version
run: /usr/bin/xcodebuild -version

- name: Checkout Repo
uses: actions/checkout@v4

- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_DEV_CERT }}
P12_PASSWORD: ${{ secrets.IOS_CERT_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH

# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH

# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles

- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- shell: bash
run: ./gradlew generateDummyFramework

- name: Set up cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest
- name: Setup gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Install cocoapods
shell: bash
run: ./gradlew podInstall
- name: Build with Xcode
run: xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -configuration Debug -destination generic/platform=iOS -archivePath $RUNNER_TEMP/Tidy.xcarchive

- name: Build with Gradle
run: ./gradlew iosSimulatorArm64Binaries
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: iOS Archive
path: $RUNNER_TEMP/Tidy/**/*.xcarchive
5 changes: 1 addition & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions .run/web.run.xml

This file was deleted.

41 changes: 0 additions & 41 deletions android/build.gradle.kts

This file was deleted.

19 changes: 0 additions & 19 deletions android/src/main/AndroidManifest.xml

This file was deleted.

63 changes: 0 additions & 63 deletions android/src/main/java/com/greenmiststudios/tidy/MainActivity.kt

This file was deleted.

Loading
Loading