Skip to content

Conversation

Ilithy
Copy link
Contributor

@Ilithy Ilithy commented Jan 24, 2025

Hi;
This PR introduces the project build, and tests the build at each PR, regardless of the branch selected to push this PR.

Close: #223

@octoshrimpy
Copy link
Owner

Thank you so very much, @Ilithy! I do have a workflow I started setting up: https://github.com/octoshrimpy/quik/blob/master/.github/workflows/PR-deploy.yml

Would you be willing to make the changes to that file instead? I'm new to github actions, and your PR looks weirdly small, but the steps make sense, however I'm not seeing anything relating to signing the APK.

@Ilithy
Copy link
Contributor Author

Ilithy commented Jan 24, 2025

Thanks, but these two workflows do not perform the same task, yours directly creates an .apk file and then performs several related tasks, mine builds and tests the project, but does not compile the application (it only builds and tests the project at each commit of the PRs on all branches and therefore does not perform the signature of the file(s))
But if you want to sign your apk file, you must define KEYSTORE_FILE, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD in the secret

And add this to your workflow:

- name: Sign APK
        run: |
          jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 \
            -keystore ${{ github.workspace }}/my-release-key.keystore \
            -storepass ${{ secrets.KEYSTORE_PASSWORD }} \
            -keypass ${{ secrets.KEY_PASSWORD }} \
            -signedjar presentation/build/outputs/apk/noAnalytics/release/QUIK-noAnalytics-release-signed.apk \
            presentation/build/outputs/apk/noAnalytics/release/QUIK-noAnalytics-release.apk \
            ${{ secrets.KEY_ALIAS }}

between build apk and rename apk

This adds a "Sign APK" step that uses jarsigner to sign the generated APK. Make sure the necessary secrets (KEYSTORE_FILE, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD) are set in secrets

I let you decide if this workflow should be used or not (I'm talking about my PR), I would be happy to make the modifications that you find useful (on your workflow, among others)
friendly.

@octoshrimpy
Copy link
Owner

I see, thank you for the explanation! I'm accepting this PR, and if you could fix my terrible code help me clean up the compile APK on PR workflow, that would be ultra-fantastic.

@octoshrimpy octoshrimpy merged commit 909947b into octoshrimpy:master Jan 24, 2025
1 check passed
@Ilithy Ilithy deleted the build-on-pull-workflow branch January 24, 2025 21:55
@Ilithy
Copy link
Contributor Author

Ilithy commented Jan 24, 2025

ok i will look at that but that's not my expertise, I'm better at creating privacy policies, or other small things ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✏️ [ FEAT REQ ] add workflow for pull requests
2 participants