From 51183dd53f50a0da533843e3b357bd342d33210f Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 07:24:04 +0200 Subject: [PATCH 1/6] ci: add new workflow to build android apk --- .github/workflows/AndroidBuild.yml | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/AndroidBuild.yml diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml new file mode 100644 index 000000000..8d8677fa8 --- /dev/null +++ b/.github/workflows/AndroidBuild.yml @@ -0,0 +1,39 @@ +name: AndroidBuild + +on: + pull_request: + branches: [ master ] + push: + branches: [ master ] + +jobs: + build: + runs-on: macOS-latest //or ubunto-latest or windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.1.0 + + - name: Set up JDK 11 + uses: actions/setup-java@v3.13.0 + with: + distribution: 'adopt' + java-version: '17' + + - name: Grant execute permissions for gradlew //this step is only for macOS + run: chmod +x ./gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: dsTemplate.apk + path: app/build/outputs/apk/debug/app-debug.apk + + - name: Decode Keystore + run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > /tmp/keystore.jks + + - name: Build Release + run: ./gradlew assembleRelease -Pandroid.injected.signing.store.file=/tmp/keystore.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ No newline at end of file From b20049b4430aa4846bb2eeed21511ef87450484d Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 07:55:49 +0200 Subject: [PATCH 2/6] ci: change name of branch from master to main --- .github/workflows/AndroidBuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml index 8d8677fa8..b689171bb 100644 --- a/.github/workflows/AndroidBuild.yml +++ b/.github/workflows/AndroidBuild.yml @@ -2,9 +2,9 @@ name: AndroidBuild on: pull_request: - branches: [ master ] + branches: [ main ] push: - branches: [ master ] + branches: [ main ] jobs: build: From ed24c90b0689be2b6d36fdf15a17c66a8eba8cf4 Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 08:13:47 +0200 Subject: [PATCH 3/6] ci: change os from macos to ubuntu --- .github/workflows/AndroidBuild.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml index b689171bb..562518203 100644 --- a/.github/workflows/AndroidBuild.yml +++ b/.github/workflows/AndroidBuild.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: macOS-latest //or ubunto-latest or windows-latest + runs-on: ubuntu-latest steps: - name: Checkout code @@ -20,9 +20,6 @@ jobs: distribution: 'adopt' java-version: '17' - - name: Grant execute permissions for gradlew //this step is only for macOS - run: chmod +x ./gradlew - - name: Build with Gradle run: ./gradlew build From 43680f4651d2897bbdbbc073267df0570940b3c5 Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 08:16:25 +0200 Subject: [PATCH 4/6] ci: fix gradlew execute permission --- .github/workflows/AndroidBuild.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml index 562518203..e878afa63 100644 --- a/.github/workflows/AndroidBuild.yml +++ b/.github/workflows/AndroidBuild.yml @@ -20,6 +20,10 @@ jobs: distribution: 'adopt' java-version: '17' + - name: Grant execute permission for gradlew + run: | + chmod +x ./gradlew + - name: Build with Gradle run: ./gradlew build From 7385730417b3ebe5850444b33b488f1386f3219a Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 08:38:19 +0200 Subject: [PATCH 5/6] ci: change to assembleDebug --- .github/workflows/AndroidBuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml index e878afa63..c53e83170 100644 --- a/.github/workflows/AndroidBuild.yml +++ b/.github/workflows/AndroidBuild.yml @@ -37,4 +37,4 @@ jobs: run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > /tmp/keystore.jks - name: Build Release - run: ./gradlew assembleRelease -Pandroid.injected.signing.store.file=/tmp/keystore.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ No newline at end of file + run: ./gradlew assembleDebug -Pandroid.injected.signing.store.file=/tmp/keystore.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ No newline at end of file From aef5832e0c3a45aefb29e55209330c534caec888 Mon Sep 17 00:00:00 2001 From: Alonso Date: Fri, 18 Oct 2024 08:47:53 +0200 Subject: [PATCH 6/6] ci: change to assembleDebug with no params --- .github/workflows/AndroidBuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidBuild.yml b/.github/workflows/AndroidBuild.yml index c53e83170..a961d8ef0 100644 --- a/.github/workflows/AndroidBuild.yml +++ b/.github/workflows/AndroidBuild.yml @@ -37,4 +37,4 @@ jobs: run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > /tmp/keystore.jks - name: Build Release - run: ./gradlew assembleDebug -Pandroid.injected.signing.store.file=/tmp/keystore.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ No newline at end of file + run: ./gradlew assembleDebug \ No newline at end of file