expo-github-action
expo-github-action copied to clipboard
EAS update fails every time
Description of the bug
When the github action for Publish updates on push runs I get this result: "error: Unable to determine runtime version for android"
To Reproduce
What steps did you perform which led to this issue?
- Add EXPO_TOKEN for the repo
- Create a file path named .github/workflows/update.yml at the root of the project.
- Copy/paste the code from the github actions doc and follow the directions listed
Expected behavior
I expected the build to succeed
Actual behavior
![Screen Shot 2022-03-31 at 10 11 34 PM](https://user-images.githubusercontent.com/7016669/161198936-83621394-8983-449e-8a48-10e4ab8890da.png)
Additional context
Here is the full .yml file I am using:
name: update
on: push
jobs:
update:
name: EAS Update
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
cache: yarn
- uses: expo/expo-github-action@v7
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install
- name: Publish update
run: eas update --auto
Hi @alexreyes! Thanks for reporting this. Can you share your app manifest? (the app.json
or result of app.config.js
). I think you are missing a required property, like runtimeVersion
. We should definitely improve the error output here, because it isn't that helpful.
Okay, I don't have a runtimeVersion
set in the app.json
yet. I found the runtime versions doc, but I'm not sure which version I should put. Is 2.718
the most recent version?
Here's my app.json:
{
"expo": {
"name": "wagmi app",
"slug": "wagmi-app",
"version": "1.0.5",
"orientation": "portrait",
"owner": "wagmi",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": false,
"bundleIdentifier": "com.alex243.wagmi.app"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/icon.png",
"color": "#ffffff",
"sounds": []
}
]
]
}
}
Hi @alexreyes! The runtime version is something you can fill out. It's a version that blocks updates to incompatible builds. In the managed workflow, using the classic build and update system, we use the Expo SDK version (e.g. 44.0.0
). From our docs:
By default, the runtime version is determined by the Expo SDK version, but this will not adequately describe the different runtime versions of your app if you build more than once per SDK release. In this case, you will need to specify a runtimeVersion to ensure your updates are delivered only to compatible builds. This runtimeVersion should be updated whenever you update your project's native modules and change the JS–native interface.
But for EAS build and custom dev clients, you are in control of that value. You can use 1
, 1.0.0
, or even something else.
Hey @byCedric okay I see, but I'm still a bit confused. What value should I be using for the runtimeVersion if I'm building multiple times per SDK release? Should the runtimeVersion
be 44.0.0
?
Whenever I run expo publish locally things seem to work fine without the runtimeVersion
being manually specified too.