diff --git a/.github/workflows/push_ci.yml b/.github/workflows/push_ci.yml new file mode 100644 index 0000000..f54f7ae --- /dev/null +++ b/.github/workflows/push_ci.yml @@ -0,0 +1,56 @@ +name: main + +on: + workflow_dispatch: + push: + branches: [ master ] + paths-ignore: + - '**.md' + - '**.txt' + - '.github/**' + - '!.github/workflows/**' + +jobs: + build: + name: Build CI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.12 + with: + cmake-version: '3.22.1' + - name: Prepare Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + java-package: jdk + - name: Cache Gradle Dependencies + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + !~/.gradle/caches/build-cache-* + key: gradle-deps-core-${{ hashFiles('**/build.gradle') }} + restore-keys: | + gradle-deps + - name: Cache Gradle Build + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches/build-cache-* + key: gradle-builds-core-${{ github.sha }} + restore-keys: | + gradle-builds + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: | + ./gradlew :app:assembleRelease + echo "APK_FILE=$(find app/build/outputs/apk/release -name '*.apk')" >> $GITHUB_ENV + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + path: ${{ env.APK_FILE }} + name: app-release-${{ github.event.head_commit.id }}