From 939e9274f7e52e358c37e7ab32f0963e12c115b3 Mon Sep 17 00:00:00 2001 From: MUEDSA <7676275+muedsa@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:19:17 +0800 Subject: [PATCH] add: github action ci build & dependabot --- .github/dependabot.yml | 26 ++++++++++++++++++++++++++ .github/workflows/android.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/android.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..75849be --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +version: 2 +registries: + maven-google: + type: maven-repository + url: https://maven.google.com + username: "" + password: "" + maven-center: + type: maven-repository + url: https://repo.maven.apache.org/maven2/ + username: "" + password: "" +updates: + - package-ecosystem: "gradle" + directory: "/" + registries: + - maven-center + - maven-google + + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: ".github/workflows" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..473062f --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,30 @@ +name: Android CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew :app:assembleDebug :app:assembleRelease + - name: Upload a Build Artifact + if: success() + uses: actions/upload-artifact@v4.3.1 + with: + name: build-artifact + path: | + ./**/*.apk \ No newline at end of file