how to build without publishing?

my use case is i’m trying to create builds for testing without publishing.

when i run expo build, i get the following

> expo build:android --no-publish --no-wait --release-channel prod
[21:05:37] Making sure project is set up correctly...
[21:05:40] Your project looks good!
[21:05:40] Checking if current build exists...

[21:05:42] No currently active or previous builds for this project.
[21:05:44] Looking for releases...
[21:05:45] Using existing release on channel "prod":
  publicationId: xxxxxxxx-a08c-11e8-a3c6-xxxxxxxxxxx
  publishedTime: 2018-08-15T13:10:26.200Z

When i try to upload the apk into play console, it fails with reason that i’m uploading an older versionCode.
based on that and the output above, it appears that running expo build will only build something that was previously published?

am i missing something here?

i’ve tried building like 3 times already.

Hey @wexpo,

If you are submitting new builds to the Play Console, you need to increment your versionCode property in your app.json so that builds can be differentiated by Google. Also, when passing the --no-publish flag, the build will use the last successful published JS bundle from whatever channel you designate.

Cheers,

Adam

@adamjnav thank you for the response.

I am already incrementing my versionCode.

Also, when passing the --no-publish flag, the build will use the last successful published JS bundle from whatever channel you designate.

This doesn’t make a lot of sense to me. What is the use case for using the --no-publish flag?
If it will only build the last successful published JS bundle, then how can a user ever build something without publishing it?

My use case is i want to generate apk and ipas for internal testing. but because these are not ready yet, I don’t want to publish them.
(I understand I can achieve this by using a different release channel as you describe above.)

thanks

well it looks like the docs have been updated since i last looked.
this pretty much explains how to publish and build for one channel and then move that build over to a new channel
https://docs.expo.io/versions/v30.0.0/distribution/advanced-release-channels#promoting-a-release-to-a-new-channel

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.