semantic-release-expo
semantic-release-expo copied to clipboard
Support publishing
Description of the feature
During the publish
step the plugin could automatically perform a expo-cli publish
. It would only do this if the environment was correctly verified during verifyConditions
Motivation
It would be really handy to have builds published automatically to Expo as part of the semantic-release workflow.
Additional context
It would be really cool if you could add rules to determine the channel that the release is published to. Not really sure how we could do that. There is semantic-release/semantic-release#563 for supporting channels for NPM packages, so would probably make sense to wait for that to be resolved before we figured out what to do for channels.
For now we could just specify which channel to publish to in the configuration. It could publish by default to the default
channel (duh) but it would most likely best if it published to alpha
. Then you can manually change the channel for specific version with expo-cli publish:set -p <id> -c <beta|production>
.
I happy to do the leg work getting this feature together if you're keen for it. Currently using this plugin in https://github.com/ef-carbon/react-native-demo
Braindump: Reading the Publishing documentation there are certain keys that require a rebuild of the native side. It might be a stretch goal for this to automatically kick of an actual build or warning or something when an native build is required.
Hi Matt! Great feature request! Let's get this in 😄 And thanks for the link where you use it, it's always fun to see it in action. 👍
Ok, so let's break it down into multiple steps. First, we need to add the expo publish
part right? I would recommend splitting the release channel part into a separate feature request. This way we can manage it a bit easier and, if necessary, wait on the semantic release channels. Thanks for the link, that sure looks damn interesting! 😄
How do you feel about this?
-
Verify conditions step runs
expo doctor
combined withexpo whoami
. This should not only validate your project but also check if the current environment may push to Expo. -
Publish step will build and publish your project with
expo publish
. ~~I guess we should also implement some configuration about what platforms needs to be built.~~ (mixed uppublish
andbuild
, my bad) And, of course, the release channels! But let's get a working version first.
If you want to get some work done already, feel free to do so! I'll try to make some time available too for this. I can't tell when yet, but I'll keep you posted!
Again, thanks for the awesome suggestion! ❤️
Adding expo doctor
in the verifyConditions
totally makes sense, forgot about that command: haven't ran that for a while.
I was thinking the verifyConditions
could do expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
if those two environment variables were available. They can then be added as secret CI keys.
On board with adding the stretch goals later, the MVP for this is essentially run expo publish
as part of the semantic-release
publish
step (plus the necessary verifyConditions
to support that)