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

Add automated play store uploads #12217

Merged
merged 10 commits into from
Jun 18, 2020
Merged

Conversation

oguzkocer
Copy link
Contributor

@oguzkocer oguzkocer commented Jun 18, 2020

I am targeting this PR against the release branch since it doesn't change anything in the actual code and it makes it much easier to test. I also need to release a new alpha/beta, but since it is for a very minor change, I wanted to use the opportunity to test the PR.

P.S: I suggest reviewing this PR with the Hide whitespace changes option enabled. I committed the whitespace changes my editor made to make it easier to work with the file in the future.

To test:
1. In Play Store discard the drafts for both alpha and beta and remove the artifacts for 883 and 884. These were added with the script, so I wanted to keep it as a test instruction. Edit: I removed these, so you can ignore this step.
2. Disable this pre-check since it'll prevent the script running on a branch that's not a release branch.
3. Run bundle exec fastlane run configure_apply which will download the upload credentials
4. Run bundle exec fastlane build_and_upload_pre_releases: This will build and upload alpha and beta builds we deleted in Step 1.

No cleanup is necessary since we want to release a new beta and if it turns out to be necessary, I'll take care of it. Also, this will not test the build_and_upload_release lane, but it's pretty much the same as the pre-releases with only difference being the production track.

Edit: Cleanup will be necessary since there is a new PR against the release branch, but I can do that.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@oguzkocer oguzkocer added this to the 15.1 ❄️ milestone Jun 18, 2020
@oguzkocer oguzkocer requested review from jkmassel and loremattei June 18, 2020 03:07
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 18, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it worked for me – left one suggestion around naming, but not critical.

alpha: true,
beta: true,
final: false)
android_build_preflight()
build_alpha(skip_prechecks: true, skip_confirm: options[:skip_confirm])
build_beta(skip_prechecks: true, skip_confirm: options[:skip_confirm])
build_alpha(skip_prechecks: true, skip_confirm: options[:skip_confirm], upload_to_play_store: true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion just based on the WPiOS and WooAndroid implementations – in those cases we renamed the lanes to build_and_upload_{type} to better communicate what they do, and they always do the upload. Having an upload option on a build lane (which I kinda think of as a method) seems like it'd almost make more sense as its own lane after building?

I think the best way to go here might just be to be consistent with WCAndroid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I went this route is to give us the ability to build the alpha or beta without uploading to play store. I followed WCAndroid's example with the main lanes build_and_upload_release & build_and_upload_pre_releases. However, at times I have to try to build the app to fix build errors but I don't want it to be uploaded, so these lanes would be helpful. Having said that, they are not crucial either, I can just run the necessary commands manually. I just prefer this because I know it'll be the same when I run the actual script.

in those cases we renamed the lanes to build_and_upload_{type} to better communicate what they do, and they always do the upload.

In this case, it doesn't always upload the build, so it still does communicate what it does, it just does something different.


What do you think? Should I make the change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not set on it – so feel free to merge as-is!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's merge it for now, but if you feel strongly about it, we can definitely change the naming.

cc @loremattei - would love to hear your take as well.

@oguzkocer oguzkocer merged commit 9feff26 into release/15.1 Jun 18, 2020
@oguzkocer oguzkocer deleted the add/automated-play-store-uploads branch June 18, 2020 23:37
This was referenced Jun 19, 2020
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.

2 participants