diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6137d8f..a85946f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,8 +5,6 @@ on: branches: - main pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -17,6 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: set up JDK 17 uses: actions/setup-java@v4 with: @@ -24,15 +23,19 @@ 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 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: @@ -42,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: @@ -58,5 +63,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Build with Gradle - run: ./gradlew android:check \ No newline at end of file + run: ./gradlew composeApp:testDebugUnitTest \ No newline at end of file diff --git a/.github/workflows/desktop-web.yml b/.github/workflows/desktop-web.yml index 125df65..9bcc134 100644 --- a/.github/workflows/desktop-web.yml +++ b/.github/workflows/desktop-web.yml @@ -5,8 +5,6 @@ on: branches: - main pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -27,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 @@ -56,4 +56,4 @@ jobs: node-version: '10.x' - name: Build with Gradle - run: ./gradlew jsApp:assemble \ No newline at end of file + run: ./gradlew composeApp:jsJar \ No newline at end of file diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 8e7ba4f..cf80215 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -4,9 +4,7 @@ on: push: branches: - main - pull_request: - branches: - - main + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -16,9 +14,41 @@ 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: @@ -26,20 +56,17 @@ jobs: 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 + if: $GITHUB_REF == 'main' + uses: actions/upload-artifact@v3 + with: + name: iOS Archive + path: $RUNNER_TEMP/Tidy/**/*.xcarchive \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 04e773a..e501606 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -8,11 +8,8 @@