Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate a debug APK on GitHub Actions #70

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

dtinth
Copy link
Contributor

@dtinth dtinth commented Jan 19, 2021

Similar to how VSCodium is an open-source binary distribution of VS Code, this workflow builds an APK file ready to be installed. Since it is built on GitHub Actions, all the process involved in building is transparent and open, so the generated binaries can be trusted.

Important note: This workflow generates a debug APK with the default .env file pointing to development backend. Not sure if this would cause confusion… maybe better to generate an APK that points to the actual production backend?? It could be bad if people actually use the generated APKs here1 not knowing that the software is interfacing with the development backend and not the real backend, because then contract tracing would not work for that person... Elaborated in issue #71.

image

GitHub Actions Run URL: https://github.com/dtinth/SQUID/actions/runs/496771323

Footnotes:
1 Some people may fear that the app published on the store may not match the source code on GitHub, so they might prefer to install binaries that are built by public CI servers instead.

@wizard06
Copy link

Is it possible to build normal APK that points to production backend, then build debug APK that points to development backend?

Or alternatively, we will need to provide a UI for the users to change backend according to their needs.

For VSCodium, I actually need to modify a few things to make it work like a drop-in replacement of VS Code.

@n3tr n3tr added the internal label Jan 20, 2021
@dtinth
Copy link
Contributor Author

dtinth commented Jan 20, 2021

@wizard06 Release APK requires signing. So we would need to generate a keystore (JKS) file and use that keystore when building APK. IMO, for personal usage a Debug APK that points to the production server works just fine for me.

@wizard06
Copy link

@dtinth Ah, I see

@n3tr
Copy link
Collaborator

n3tr commented Jan 20, 2021

@Guutong Do we require any additional setup to point to production?

@dtinth
Copy link
Contributor Author

dtinth commented Jan 20, 2021

@n3tr From my analysis, running this after checkout is enough.

cat .env.dev | sed 's/[.-]dev//' > .env

@Guutong
Copy link
Collaborator

Guutong commented Jan 20, 2021

@n3tr @dtinth yes, it's enough for me.

@dtinth
Copy link
Contributor Author

dtinth commented Jan 20, 2021

To point to production backend, you can cherry pick this commit:

dtinth@d64bf62

@n3tr
Copy link
Collaborator

n3tr commented Jan 21, 2021

@Guutong @dtinth

Okie, that means there is nothing preventing developers to build the app and point to the production API.

Since I don't have much context on the API side, we need to discuss more with the team if they have any concerns.

We also have a plan to update the documentation and add a contribution guide, probably need to include this as well.


For now, I will get this in first since it is very useful for us to have a debug APK.

Thanks for your contribution.

@n3tr n3tr merged commit 7ba8d0d into codeforpublic:master Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants