diff --git a/.eas/workflows/build-eas.yml b/.eas/workflows/build-eas.yml new file mode 100644 index 0000000..313beb5 --- /dev/null +++ b/.eas/workflows/build-eas.yml @@ -0,0 +1,71 @@ +name: build + +on: + push: + branches: ['*'] + +jobs: + build_app_android: + steps: + - uses: eas/checkout # This also changes cwd + - uses: eas/install_node_modules + + - name: Build the config plugin so it can be used in the example app + run: | + cd .. + npm run build:plugin + + - name: Set the Expo version for the example project and install recommend dep versions + run: npx expo install expo@^53 --fix # one dep is 54-incompatible + + - name: Run expo prebuild + run: EXPO_DEBUG=1 npx expo prebuild -p android + + - name: Print eas.json + run: cat eas.json + + - name: Bundle JS code to verify it bundles + run: npx expo export + + # perform native build steps. + # Alternatively, use `eas/build` which will work too but performs checkout and install again (they basically noop) + - uses: eas/resolve_build_config + - uses: eas/run_gradle + - uses: eas/find_and_upload_build_artifacts + type: build + params: + platform: android + profile: preview + + build_app_ios: + steps: + - uses: eas/checkout # This also changes cwd + - uses: eas/install_node_modules + + - name: Build the config plugin so it can be used in the example app + run: | + cd .. + npm run build:plugin + + - name: Set the Expo version for the example project and install recommend dep versions + run: npx expo install expo@next --fix + + - name: Run expo prebuild + run: EXPO_DEBUG=1 npx expo prebuild -p ios + + - name: Bundle JS code to verify it bundles + run: npx expo export + + - name: Print eas.json + run: cat eas.json + + # perform native build steps + # Alternatively, use `eas/build` which will work too but performs checkout and install again (they basically noop) + - uses: eas/resolve_build_config + - uses: eas/generate_gymfile_from_template + - uses: eas/run_fastlane + - uses: eas/find_and_upload_build_artifacts + type: build + params: + platform: ios + profile: preview diff --git a/example/app.json b/example/app.json index 761b0b1..29a4a38 100644 --- a/example/app.json +++ b/example/app.json @@ -17,6 +17,12 @@ }, "android": { "package": "com.vonovak.themeexpoexample" - } + }, + "extra": { + "eas": { + "projectId": "348a68a7-b896-4172-ae18-64e4afc32413" + } + }, + "owner": "expo-ci" } } diff --git a/example/eas.json b/example/eas.json new file mode 100644 index 0000000..13c2ea0 --- /dev/null +++ b/example/eas.json @@ -0,0 +1,25 @@ +{ + "cli": { + "version": ">= 16.17.4", + "appVersionSource": "remote" + }, + "build": { + "development": { + "developmentClient": true, + "distribution": "internal" + }, + "preview": { + "withoutCredentials": true, + "distribution": "internal", + "ios": { + "simulator": true + } + }, + "production": { + "autoIncrement": true + } + }, + "submit": { + "production": {} + } +}