diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0aae365..a85946f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,14 +5,17 @@ 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: @@ -20,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: @@ -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: @@ -54,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 4aac4c6..9bcc134 100644 --- a/.github/workflows/desktop-web.yml +++ b/.github/workflows/desktop-web.yml @@ -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 @@ -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 @@ -52,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 f79a7b3..0ca5c1c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -4,17 +4,51 @@ 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: @@ -22,20 +56,16 @@ 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 + 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 21cf18a..e501606 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,14 +5,11 @@