From 894956cceed781a12012d40e02ae433c6c7368d7 Mon Sep 17 00:00:00 2001 From: Benjamin Halko Date: Sun, 3 Sep 2023 08:48:42 -0700 Subject: [PATCH 1/6] ci: added release workflow --- .github/workflows/release-build.yml | 47 +++++++++++++++++++++++++++ .github/workflows/release.yml | 50 ----------------------------- 2 files changed, 47 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/release-build.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 0000000000..c175428bc7 --- /dev/null +++ b/.github/workflows/release-build.yml @@ -0,0 +1,47 @@ +name: "Release Build" + +on: + push: + tags: + - "v*" + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Build with Gradle + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew assembleRelease --no-daemon + + - name: Sign APK + id: sign_apk + uses: ilharp/sign-android-release@v1 + with: + releaseDir: ./app/build/outputs/apk/release/ + signingKey: ${{ secrets.SIGNING_KEYSTORE }} + keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} + keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }} + keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} + + - name: Add version to APK + run: mv ${{steps.sign_apk.outputs.signedFile}} revanced-manager-${{ env.RELEASE_VERSION }}.apk + + - name: Publish release APK + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: revanced-manager-${{ env.RELEASE_VERSION }}.apk \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9b0944902f..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Android Release - -on: - push: - branches: - - dev - paths-ignore: - - "**.md" - - ".idea/**" - pull_request: - branches: - - dev - paths-ignore: - - "**.md" - - ".idea/**" - -jobs: - build: - name: Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle - - - name: Build with Gradle - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./gradlew assembleRelease --no-daemon - - - name: Sign APK - id: sign_apk - uses: r0adkll/sign-android-release@v1 - with: - releaseDirectory: ./app/build/outputs/apk/release/ - signingKeyBase64: ${{ secrets.TEMP_SIGNING_KEYSTORE }} - keyStorePassword: ${{ secrets.TEMP_SIGNING_KEYSTORE_PASSWORD }} - alias: ${{ vars.TEMP_SIGNING_KEY_ALIAS }} - keyPassword: ${{ secrets.TEMP_SIGNING_KEY_PASSWORD }} - - - name: Upload APK - uses: actions/upload-artifact@v3 - with: - name: revanced-manager - path: ${{ steps.sign_apk.outputs.signedReleaseFile }} From 451b0b3ab2c25a36d9a2bdcc460e4d27aa72b5fe Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sun, 3 Sep 2023 10:25:41 -0700 Subject: [PATCH 2/6] slight refactor --- .github/workflows/release-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index c175428bc7..17f8568388 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -37,11 +37,11 @@ jobs: keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} - name: Add version to APK - run: mv ${{steps.sign_apk.outputs.signedFile}} revanced-manager-${{ env.RELEASE_VERSION }}.apk + run: mv ${{ steps.sign_apk.outputs.signedFile }} revanced-manager-${{ env.RELEASE_VERSION }}.apk - name: Publish release APK uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - files: revanced-manager-${{ env.RELEASE_VERSION }}.apk \ No newline at end of file + files: revanced-manager-${{ env.RELEASE_VERSION }}.apk From 11c7cba646c8e4df1811ee20a1d6bf8aa8d7be1d Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:44:03 -0700 Subject: [PATCH 3/6] ci: no need for JDK 17 --- .github/workflows/release-build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 17f8568388..ce12c95382 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -14,13 +14,6 @@ jobs: - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle - - name: Build with Gradle env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a7f53e6c86c9efcaa4ebdd726fdb5643199d0ebb Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:56:11 -0700 Subject: [PATCH 4/6] ci: Revert removal of JDK 17 --- .github/workflows/release-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index ce12c95382..17f8568388 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -14,6 +14,13 @@ jobs: - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + - name: Build with Gradle env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2b2143e365971781c9113fc0b4ad71997d382768 Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:58:19 -0700 Subject: [PATCH 5/6] Update release-build.yml --- .github/workflows/release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 17f8568388..52216b7f3b 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -1,4 +1,4 @@ -name: "Release Build" +name: Release Build on: push: From 5012782d51fd484b99b919f01fbb723b4c62e7dc Mon Sep 17 00:00:00 2001 From: Benjamin Halko Date: Fri, 15 Sep 2023 14:02:14 -0700 Subject: [PATCH 6/6] Update release-build.yml --- .github/workflows/release-build.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 52216b7f3b..ec1e0714e9 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -10,16 +10,12 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle + - name: Set up Java + run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV - name: Build with Gradle env: