From d08397c40fa8028ec2ad623a83630ef4095a93fc Mon Sep 17 00:00:00 2001 From: TimPushkin Date: Fri, 23 Sep 2022 22:36:12 +0300 Subject: [PATCH] Update workflows and signing --- .github/workflows/assemble.yml | 44 ++++++++++++++++++++++ .github/workflows/unit-test.yml | 41 ++++++-------------- app/build.gradle | 13 +------ my-release-key.keystore.gpg | Bin 2533 -> 0 bytes opencamera-extended-0152130a4960.json.enc | Bin 2368 -> 0 bytes opencamera-sensors.jks.gpg | Bin 0 -> 2825 bytes 6 files changed, 57 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/assemble.yml delete mode 100644 my-release-key.keystore.gpg delete mode 100644 opencamera-extended-0152130a4960.json.enc create mode 100644 opencamera-sensors.jks.gpg diff --git a/.github/workflows/assemble.yml b/.github/workflows/assemble.yml new file mode 100644 index 000000000..bc4d445ac --- /dev/null +++ b/.github/workflows/assemble.yml @@ -0,0 +1,44 @@ +name: Assemble + +on: + push: + branches: [ "master" ] + workflow_dispatch: + +env: + keystore_password: ${{ secrets.KeystorePassword }} + keystore_alias: ${{ secrets.KeystoreAlias }} + keystore_alias_password: ${{ secrets.KeystoreAliasPassword }} + +jobs: + assemble-release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: 'gradle' + + - name: Decrypt keystore file + run: | + gpg --quiet --batch --yes --decrypt \ + --passphrase="${{ secrets.KeystoreEncKey }}" \ + --output release.jks \ + opencamera-sensors.jks.gpg + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Assemble release + run: ./gradlew assembleRelease + + - name: Upload release APK + uses: actions/upload-artifact@v3 + with: + name: release-apk + path: app/build/outputs/apk/release/app-release.apk + if-no-files-found: error diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 307efdd5d..090badf9e 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,43 +12,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: '8' - - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + distribution: 'temurin' + java-version: '11' + cache: 'gradle' - name: Decrypt keystore file - env: - enc_key: ${{ secrets.KeystoreEncKey }} - run: gpg --quiet --batch --yes --decrypt --passphrase="$enc_key" --output my-release-key.keystore my-release-key.keystore.gpg - - - name: Assemble debug - run: ./gradlew assembleDebug + run: | + gpg --quiet --batch --yes --decrypt \ + --passphrase="${{ secrets.KeystoreEncKey }}" \ + --output release.jks \ + opencamera-sensors.jks.gpg - - name: Assemble release - run: ./gradlew assembleRelease + - name: Grant execute permission for gradlew + run: chmod +x gradlew - name: Test debug run: ./gradlew testDebugUnitTest - name: Test release run: ./gradlew testReleaseUnitTest - - - name: Cleanup Gradle Cache - # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. - # Restoring these files from a GitHub Actions cache might cause problems for future builds. - run: | - rm -f ~/.gradle/caches/modules-2/modules-2.lock - rm -f ~/.gradle/caches/modules-2/gc.properties diff --git a/app/build.gradle b/app/build.gradle index 17cb26d6d..829664e22 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,16 +25,9 @@ android { signingConfigs { release - debug if (System.getenv("CI")) { release { - storeFile rootProject.file("my-release-key.keystore") - storePassword System.getenv("keystore_password") - keyAlias System.getenv("keystore_alias") - keyPassword System.getenv("keystore_alias_password") - } - debug { - storeFile rootProject.file("my-release-key.keystore") + storeFile rootProject.file("release.jks") storePassword System.getenv("keystore_password") keyAlias System.getenv("keystore_alias") keyPassword System.getenv("keystore_alias_password") @@ -48,10 +41,6 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.release } - debug { - minifyEnabled false - signingConfig signingConfigs.debug - } } lintOptions { diff --git a/my-release-key.keystore.gpg b/my-release-key.keystore.gpg deleted file mode 100644 index 5b0eb82277fe334538cd1005a9ef445ee601ef83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2533 zcmVM|1#oRc5W@XA7?MH|1fSj=vMoaPcUrmB7A@7!pN2Oh)UivDi z0(h-c7qsEHfn&PONk$5IMp&5nz7qED)R-RlHx21?F4GaW#y?!UqAh* z_4GKed{={RLQCHqI=C+tHw0VUB@~WN1d_Ik1#s|x{X|e$N7dv7u-!g1fgvv%%q5Lz z@64AHK1TbEI+4&A;Yu=44IHO;`y?H0f$P7ee#dPh0Kmk~;mXb2?#&&9UUx@&XORG)o6cwpZUs?OmY7^-n0K=xZx!CDs*3JY z&BQ=&u#SW&Tn-N=)$eNYr|pX-Gi0xmA$jnGD%9uhHHEsvEG-gb*WUf;^i>nchcNXgkqL)`tP&zhdiyE%W;pH zh0&IcXap$c-d=ri_dUdgNKlCp5gGcI(bP(Utahke40VW|$Lkc7$M&R@SoiFM_lLb? ztk`=c7lo%EqR@%bh97Jez@jz35;%KXt|f-~?|oz&X!23o?wnIixfYA z{emCMv6e+H)#Ou>ykErRF>xwtN%c!?VYkbcjdLWAN>gF zTJi=o#z;Z)BEMS?(;1OMt#9|*s=E0}vBkj=RJ)zN@fC?1cT~AMI!DMlG%}lsJ-%~a zeHBk>gm#hU$B1f`&fZMok}4*SBQH>Kd1^PnS&1%k`ibjtw6R8)c_Nsly(p7>LV3+{ zAFHe=99ueOnz126<|U9p6LY7_&B#uRD3g5+C`zk^Cjt*`j#AO6E@#FP-ld5}D^h3# z?kw@J(@(M~E6-74l^3YWhvErRae4%C(C;UpPY@Jlh^!OgBR=wxhgq3^;RL{|VFw2B znMK$WsTy1(BMqaH8{%pvyFywJ2ZzS=5^RKK-eeXr!M<2h0(MZOf%6+2FzH1oV6JhG z-)Z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