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

Automate build and deployment #137

Closed
2 tasks
TomTasche opened this issue Dec 13, 2019 · 4 comments
Closed
2 tasks

Automate build and deployment #137

TomTasche opened this issue Dec 13, 2019 · 4 comments
Labels

Comments

@TomTasche
Copy link
Member

Based on #136

  • Build binaries (.apk-file) and store for each build
  • Add option to push binary of a build to Google Play Store for release
@TomTasche
Copy link
Member Author

Same for iOS: opendocument-app/OpenDocument.ios#38

@ViliusSutkus89
Copy link
Contributor

I usually create an unpublished GitHub release for each commit and attach the built AAR as a release asset.
When that GitHub release is published, AAR is downloaded from release assets and uploaded to maven repo. Extra ugly because releases page is spammed to no end.

I'm sure there's a nicer way to do this.

Would be possible to upload each build to GitHub repo's Maven, but each build would have to have it's version incremented, because I suspect that Maven wouldn't like duplicate version numbers.

OpenDocument.droid v.3.3.2.commit-117
OpenDocument.droid v.3.3.2.commit-118
OpenDocument.droid v.3.3.2.commit-119

Publish a new GitHub release and specify commit number in the general text field to choose which build to release, then CI would download APK from Maven and upload to Play Store and also attach to the published GitHub release.

Unknowns for this approach:

  • Can we store APK's in Maven
  • How will this be affected by the possible migration to Android App Bundles?
  • Can we publish to Play Store on each GitHub release?
  • Is it even possible to publish to Play Store from GitHub Actions ?

@TomTasche
Copy link
Member Author

Since this project is only an app, not a library, I don't think we need an AAR? Instead, why not store the APK as an artifact for each GitHub Action run? That way you won't have to increment the version number. I do that before a release manually anyway.

Yes, we need to use Android App Bundles instead of APK. Not sure how that works from a CLI either (always build via Android Studio).

Yes, we can public to Play Store on each GitHub release. I'm sure it's possible to publish to Play Store from GitHub Actions. I'll just need to issue the correct credentials for you.

So without doing any research, I would imagine a workflow like this:

  • each commit triggers a GitHub Action, which builds the Android App Bundle
  • when a GitHub release is created, the last build for the tagged commit of the release is taken and published to Play Store (only upload the binary, publishing to customers should still be a manual process)

@TomTasche
Copy link
Member Author

TomTasche commented Jun 17, 2020

Alternatively, we could trigger the full process (build + deploy Android App Bundle + create GitHub release) on each push to master. That seems reasonable to me as I'm working on the development branch. It also avoids exceeding storage of GitHub Actions artifacts!

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

No branches or pull requests

2 participants