Skip to content

Commit

Permalink
chore(eas): config
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandatoledo committed Jul 10, 2024
1 parent 34a2d74 commit 1f76ab8
Show file tree
Hide file tree
Showing 53 changed files with 3,224 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .env.qa
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API_URL=https://dummyjson.com/

## TODO: add the variable to your CI and remove it from here, not recommended setting sensitive values on your git repo
SECRET_KEY=my-secret-key
VAR_NUMBER=10 # this is a number variable
VAR_BOOL=true # this is a boolean variable
10 changes: 5 additions & 5 deletions .github/actions/eas-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# ✍️ Description:
# This is a composite action, which means it can be used in other actions.
# This action is used to trigger an EAS Build for a specific environment (development, staging, production).
# This action is used to trigger an EAS Build for a specific environment (development, qa, staging, production).
# This action accepts those inputs:
# `APP_ENV`, which is used to generate an APK for a specific environment (development, staging, production). We use staging by default.
# `APP_ENV`, which is used to generate an APK for a specific environment (development, qa, staging, production). We use qa by default.
# `AUTO_SUBMIT`, false by default, set to true if you want to automatically submit your build to stores.
# `EXPO_TOKEN`, required, access token for your Expo account. https://expo.dev/settings/access-tokens
# `VERSION`, required, version of the app to build. used as the build message.
Expand All @@ -20,7 +20,7 @@
# - name: ⏱️ EAS Build
# uses: ./.github/actions/eas-build
# with:
# APP_ENV: staging
# APP_ENV: qa
# EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
# VERSION: ${{ github.event.release.tag_name }}
# IOS: false
Expand All @@ -29,9 +29,9 @@ name: 'Setup EAS Build + Trigger Build'
description: 'Setup EAS Build + Trigger Build'
inputs:
APP_ENV:
description: 'APP_ENV (one of): development, staging, production'
description: 'APP_ENV (one of): development, qa, staging, production'
required: true
default: 'staging'
default: 'qa'
AUTO_SUBMIT: ## TODO: we need to handle this too
description: 'AUTO_SUBMIT (one of): true, false'
required: true
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace 'com.myapp.development'
namespace 'com.rootstrap.myapp.qa'
defaultConfig {
applicationId 'com.myapp.development'
applicationId 'com.rootstrap.myapp.qa'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<data android:scheme="MyApp"/>
<data android:scheme="com.myapp.development"/>
<data android:scheme="exp+obytesapp"/>
<data android:scheme="com.rootstrap.myapp.staging"/>
<data android:scheme="exp+fernanda-test-my-app"/>
<data android:scheme="com.rootstrap.myapp.qa"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.myapp.development
package com.rootstrap.myapp.qa

import android.os.Build
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.myapp.development
package com.rootstrap.myapp.qa

import android.app.Application
import android.content.res.Configuration
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:statusBarColor">#2E3C4B</item>
</style>
<style name="ResetEditText" parent="@android:style/Widget.EditText">
<item name="android:padding">0dp</item>
Expand Down
2 changes: 1 addition & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
description: `${Env.NAME} Mobile App`,
owner: Env.EXPO_ACCOUNT_OWNER,
scheme: Env.SCHEME,
slug: 'obytesapp',
slug: 'fernanda-test-my-app',
version: Env.VERSION.toString(),
orientation: 'portrait',
icon: './assets/icon.png',
Expand Down
24 changes: 23 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@
},
"staging": {
"channel": "staging",
"distribution": "store",
"pnpm": "8.15.4",
"ios": {
"image": "latest"
},
"android": {
"buildType": "app-bundle",
"image": "latest"
},
"env": {
"APP_ENV": "staging",
"EXPO_NO_DOTENV": "1",
"FLIPPER_DISABLE": "1"
},

"prebuildCommand": "prebuild --skip-dependency-update react",
"cache": {
"key": "eas-1"
}
},
"qa": {
"channel": "qa",
"distribution": "internal",
"pnpm": "8.15.4",
"ios": {
Expand All @@ -36,7 +58,7 @@
"image": "latest"
},
"env": {
"APP_ENV": "staging",
"APP_ENV": "qa",
"EXPO_NO_DOTENV": "1",
"FLIPPER_DISABLE": "1"
},
Expand Down
10 changes: 5 additions & 5 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ require('dotenv').config({

// TODO: Replace these values with your own

const BUNDLE_ID = 'com.myapp'; // ios bundle id
const PACKAGE = 'com.myapp'; // android package name
const BUNDLE_ID = 'com.rootstrap.myapp'; // ios bundle id
const PACKAGE = 'com.rootstrap.myapp'; // android package name
const NAME = 'MyApp'; // app name
const EXPO_ACCOUNT_OWNER = 'expo-owner'; // expo account owner
const EAS_PROJECT_ID = 'c3e1075b-6fe7-4686-aa49-35b46a229044'; // eas project id
const EXPO_ACCOUNT_OWNER = 'rsdevs'; // expo account owner
const EAS_PROJECT_ID = '64cb622c-4ad0-457e-94ed-03842b8c03d7'; // eas project id
const SCHEME = 'MyApp'; // app scheme

/**
Expand Down Expand Up @@ -70,7 +70,7 @@ const withEnvSuffix = (name) => {
*/

const client = z.object({
APP_ENV: z.enum(['development', 'staging', 'production']),
APP_ENV: z.enum(['development', 'qa', 'staging', 'production']),
NAME: z.string(),
SCHEME: z.string(),
BUNDLE_ID: z.string(),
Expand Down
30 changes: 30 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
.xcode.env.local

# Bundle artifacts
*.jsbundle

# CocoaPods
/Pods/
11 changes: 11 additions & 0 deletions ios/.xcode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
Loading

0 comments on commit 1f76ab8

Please sign in to comment.