From d4521d582f1309abc5212e2008446ea04c15f9c5 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sun, 31 Jul 2022 22:32:03 +0800 Subject: [PATCH] Cleanup yml --- .github/workflows/ci.yml | 18 ++++++------------ .github/workflows/release.yml | 9 +++------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f3d597a8..ec83cd441 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,8 +64,7 @@ jobs: distribution: 'zulu' java-version: 17 - uses: gradle/gradle-build-action@v2 - - name: Unit tests - run: ./gradlew test + - run: ./gradlew test instrumentation-tests: runs-on: macos-latest @@ -81,18 +80,15 @@ jobs: with: distribution: 'zulu' java-version: 17 - - name: Gradle cache - uses: gradle/gradle-build-action@v2 - - name: AVD cache - uses: actions/cache@v3 + - uses: gradle/gradle-build-action@v2 + - uses: actions/cache@v3 id: avd-cache with: path: | ~/.android/avd/* ~/.android/adb* key: avd-${{ matrix.api-level }} - - name: Create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' + - if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} @@ -100,8 +96,7 @@ jobs: emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: echo "Generated AVD snapshot for caching." - - name: Instrumentation tests - uses: reactivecircus/android-emulator-runner@v2 + - uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} force-avd-creation: false @@ -118,8 +113,7 @@ jobs: distribution: 'zulu' java-version: 17 - uses: gradle/gradle-build-action@v2 - - name: Build - run: ./gradlew app:assemble + - run: ./gradlew app:assemble - uses: actions/upload-artifact@v3 if: matrix.os == 'ubuntu-latest' with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7031c7bf..5a6a08cd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,9 @@ jobs: with: distribution: 'zulu' java-version: 17 - - name: Build APK - uses: gradle/gradle-build-action@v2 - with: - arguments: app:assembleProdRelease - - name: Create Release - uses: ncipollo/release-action@v1 + - uses: gradle/gradle-build-action@v2 + - run: ./gradlew app:assembleProdRelease + - uses: ncipollo/release-action@v1 with: artifacts: "app/build/*.apk" token: ${{ secrets.GITHUB_TOKEN }}