diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 748cb7d..8e48d56 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,34 +17,18 @@ on: - cron: '0 0 * * 1' jobs: - build-ubuntu: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Java - run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV - - - name: Install SDK - uses: malinskiy/action-android/install-sdk@release/0.1.4 + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] - - name: Install NDK - run: | - sdkmanager --install "ndk;$(grep ndkVersion app/gradle.properties | cut -d= -f2)" - - - name: Build - run: | - ./gradlew build - - build-macos: - runs-on: macos-latest + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Java - run: echo "JAVA_HOME=$JAVA_HOME_17_arm64" >> $GITHUB_ENV + run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV - name: Install SDK uses: malinskiy/action-android/install-sdk@release/0.1.4 @@ -59,7 +43,7 @@ jobs: release: if: startsWith(github.ref, 'refs/tags/v') - needs: [build-ubuntu, build-macos] + needs: [build] runs-on: ubuntu-latest steps: @@ -69,7 +53,7 @@ jobs: fetch-depth: 0 - name: Setup Java - run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV + run: echo "JAVA_HOME=${{ env.JAVA_HOME_17_X64 || env.JAVA_HOME_17_ARM64 }}" >> $GITHUB_ENV - name: Install SDK uses: malinskiy/action-android/install-sdk@release/0.1.4