From 7c6d744ff6ad762205a87ccd2489e2c44dbac24f Mon Sep 17 00:00:00 2001 From: andrew-polk Date: Fri, 16 Dec 2022 15:12:46 -0700 Subject: [PATCH 1/2] Build with Github Actions --- .github/workflows/gradle-build.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/gradle-build.yml diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml new file mode 100644 index 0000000..ecb4014 --- /dev/null +++ b/.github/workflows/gradle-build.yml @@ -0,0 +1,36 @@ +name: Android CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: gradle wrapper + run: gradle wrapper + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Build Release Bundle + run: ./gradlew :app:bundleRelease + + - name: Upload bundle artifact + uses: actions/upload-artifact@v3 + with: + name: HearThisAndroidReleaseBundle + path: app/build/outputs/bundle/release/app-release.aab \ No newline at end of file From 85488eab4a37cf736e538a68c06c5873ae95110f Mon Sep 17 00:00:00 2001 From: Andrew Polk Date: Mon, 19 Dec 2022 14:28:34 -0700 Subject: [PATCH 2/2] Add Publish to Play Store GH Action --- .github/workflows/gradle-build.yml | 56 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index ecb4014..79e78f6 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -2,35 +2,43 @@ name: Android CI on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: gradle + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: "11" + distribution: "temurin" + cache: gradle + + - name: gradle wrapper + run: gradle wrapper + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Build Release Bundle + run: ./gradlew :app:bundleRelease + + - name: Upload bundle artifact + uses: actions/upload-artifact@v3 + with: + name: HearThisAndroidReleaseBundle + path: app/build/outputs/bundle/release/app-release.aab - - name: gradle wrapper - run: gradle wrapper - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build - - name: Build Release Bundle - run: ./gradlew :app:bundleRelease - - - name: Upload bundle artifact - uses: actions/upload-artifact@v3 - with: - name: HearThisAndroidReleaseBundle - path: app/build/outputs/bundle/release/app-release.aab \ No newline at end of file + - name: Publish to Play Store Internal track + uses: r0adkll/upload-google-play@v1.0.19 + with: + serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} + packageName: org.sil.hearthis + releaseFiles: app/build/outputs/bundle/release/app-release.aab + track: internal + status: completed