From f3ad600c94e865a1536ad5f99dd752edbc18260c Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 17:58:13 -0300 Subject: [PATCH 1/6] feat: add signing key to the nightly build --- .github/workflows/android.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5077ee979..e52066ccb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -22,6 +22,17 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + + - name: Set Secret Properties + env: + LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} + run: echo "$LOCAL_PROPERTIES" > ./local.properties + + - name: Prepare release keystore + run: | + echo "${{ secrets.BASE_64_SIGNING_KEY }}" > release_keystore.jks.asc + gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > app/release_keystore.jks + - name: Build with Gradle run: ./gradlew assembleNightly - name: Upload a Build Artifact From 21e940c94de312672cdffe00d9bc8dd13898e39c Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:00:36 -0300 Subject: [PATCH 2/6] fx: maybe fix the error on nightly builds --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e52066ccb..1489d77b5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -31,7 +31,7 @@ jobs: - name: Prepare release keystore run: | echo "${{ secrets.BASE_64_SIGNING_KEY }}" > release_keystore.jks.asc - gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > app/release_keystore.jks + gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > release_keystore.jks - name: Build with Gradle run: ./gradlew assembleNightly From d6d45cd9a52f04fb70cfe7a72c06f4e57d254bf4 Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:15:06 -0300 Subject: [PATCH 3/6] Update android.yml --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1489d77b5..4d53737d2 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -34,7 +34,7 @@ jobs: gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > release_keystore.jks - name: Build with Gradle - run: ./gradlew assembleNightly + run: ./gradlew buildNightly - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.2 with: From d86509233fee148d0c25fe0287b4fb8bd19e3c21 Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:18:36 -0300 Subject: [PATCH 4/6] fix: maybe fix the signing process --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 4d53737d2..9eb80a02d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -39,4 +39,4 @@ jobs: uses: actions/upload-artifact@v3.1.2 with: name: moshidon-nightly - path: ./mastodon/build/outputs/apk/nightly/moshidon-nightly.apk + path: ./mastodon/build/intermediates/apk/nightly/moshidon-nightly.apk From 5979341fb970d93c74f5c6668b67d90928835434 Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:23:46 -0300 Subject: [PATCH 5/6] Update android.yml --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9eb80a02d..1489d77b5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -34,9 +34,9 @@ jobs: gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > release_keystore.jks - name: Build with Gradle - run: ./gradlew buildNightly + run: ./gradlew assembleNightly - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.2 with: name: moshidon-nightly - path: ./mastodon/build/intermediates/apk/nightly/moshidon-nightly.apk + path: ./mastodon/build/outputs/apk/nightly/moshidon-nightly.apk From 75161fc6949cd63558e565172f4613b9063257cf Mon Sep 17 00:00:00 2001 From: LucasGGamerM <71328265+LucasGGamerM@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:40:10 -0300 Subject: [PATCH 6/6] feat: add proper nightly signing to android.yml --- .github/workflows/android.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1489d77b5..75a494e6f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,18 +23,20 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Set Secret Properties - env: - LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} - run: echo "$LOCAL_PROPERTIES" > ./local.properties - - - name: Prepare release keystore - run: | - echo "${{ secrets.BASE_64_SIGNING_KEY }}" > release_keystore.jks.asc - gpg -d --passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" --batch release_keystore.jks.asc > release_keystore.jks + - name: Decode Keystore + id: decode_keystore + uses: timheuer/base64-to-file@v1 + with: + fileName: 'keystore/nightly_keystore.jks' + encodedString: ${{ secrets.KEYSTORE }} - name: Build with Gradle run: ./gradlew assembleNightly + env: + SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} + SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} + SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} + - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.2 with: