diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f57c98..9cbb347 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,38 +21,42 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 - - name: Execute Gradle build - run: ./gradlew --no-daemon --build-cache assembleRelease - - - name: Sign the APK run: | - echo "${{ secrets.KEYSTORE }}" > keystore.asc - gpg -d --passphrase "${{ secrets.KEY_PASSWD }}" --batch keystore.asc > keystore.jks - jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} -keypass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} - - - name: Verify the APK signature - run: jarsigner -verify -verbose -certs -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} - - - name: Zipalign the APK - run: ${{ github.workspace }}/cmdline-tools/latest/bin/zipalign -v 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk + BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) + ls /usr/local/lib/android/sdk/build-tools/$BUILD_TOOL_VERSION - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release ${{ env.RELEASE_VERSION }} - draft: false - prerelease: false - - - name: Upload release APK - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: app/build/outputs/apk/release/app-release.apk - asset_name: linklater-release.apk - asset_content_type: application/vnd.android.package-archive + # - name: Execute Gradle build + # run: ./gradlew --no-daemon --build-cache assembleRelease + # + # - name: Sign the APK + # run: | + # echo "${{ secrets.KEYSTORE }}" > keystore.asc + # gpg -d --passphrase "${{ secrets.KEY_PASSWD }}" --batch keystore.asc > keystore.jks + # jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} -keypass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} + # + # - name: Verify the APK signature + # run: jarsigner -verify -verbose -certs -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} + # + # - name: Zipalign the APK + # run: ${{ github.workspace }}/cmdline-tools/latest/bin/zipalign -v 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk + # + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: ${{ env.RELEASE_VERSION }} + # release_name: Release ${{ env.RELEASE_VERSION }} + # draft: false + # prerelease: false + # + # - name: Upload release APK + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: app/build/outputs/apk/release/app-release.apk + # asset_name: linklater-release.apk + # asset_content_type: application/vnd.android.package-archive