Skip to content

Commit

Permalink
Feat/add env vars (#3160)
Browse files Browse the repository at this point in the history
* Add env vars placeholders for expo

* put back ever team credentials

* Put back eas.json file, deleted by mistake

* update github workflow for android and ios
  • Loading branch information
Sergemuhundu authored Oct 24, 2024
1 parent 27c6fb8 commit 351bf1e
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 92 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/mobile.apps.android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
EXPO_PROJECT_NAME: ${{ secrets.EXPO_PROJECT_NAME }}
EXPO_PROJECT_OWNER: ${{ secrets.EXPO_PROJECT_OWNER }}
EXPO_PROJECT_ID: ${{ secrets.EXPO_PROJECT_ID }}
EXPO_PROJECT_PACKAGE_NAME: ${{ secrets.EXPO_PROJECT_PACKAGE_NAME }}
EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER: ${{ secrets.EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER }}

- name: Build on EAS
run: cd apps/mobile && eas build --platform android --non-interactive
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mobile.apps.ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
EXPO_PROJECT_NAME: ${{ secrets.EXPO_PROJECT_NAME }}
EXPO_PROJECT_OWNER: ${{ secrets.EXPO_PROJECT_OWNER }}
EXPO_PROJECT_ID: ${{ secrets.EXPO_PROJECT_ID }}
EXPO_PROJECT_PACKAGE_NAME: ${{ secrets.EXPO_PROJECT_PACKAGE_NAME }}
EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER: ${{ secrets.EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER }}

- name: Build on EAS
run: cd apps/mobile && eas build --platform ios --non-interactive
Expand Down
4 changes: 3 additions & 1 deletion .scripts/configure.mobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ fs.copyFile(templatePath, appJsonPath, (err) => {
.replace(/\$EXPO_PROJECT_SLUG/g, process.env.EXPO_PROJECT_SLUG)
.replace(/\$EXPO_PROJECT_NAME/g, process.env.EXPO_PROJECT_NAME)
.replace(/\$EXPO_PROJECT_OWNER/g, process.env.EXPO_PROJECT_OWNER)
.replace(/\$EXPO_PROJECT_ID/g, process.env.EXPO_PROJECT_ID);
.replace(/\$EXPO_PROJECT_ID/g, process.env.EXPO_PROJECT_ID)
.replace(/\$EXPO_PROJECT_PACKAGE_NAME/g, process.env.EXPO_PROJECT_PACKAGE_NAME)
.replace(/\$EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER/g, process.env.EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER);

fs.writeFile(appJsonPath, updatedData, (err) => {
if (err) {
Expand Down
2 changes: 2 additions & 0 deletions apps/mobile/.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ EXPO_PROJECT_SLUG=ever-teams-mobile
EXPO_PROJECT_NAME=Ever Teams Mobile
EXPO_PROJECT_OWNER=everco
EXPO_PROJECT_ID=2ff924e4-7a91-4b23-9db9-7453a8063bb0
EXPO_PROJECT_PACKAGE_NAME=ever.team
EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER=co.ever.teams
4 changes: 2 additions & 2 deletions apps/mobile/app.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
],
"android": {
"icon": "./assets/images/app-icon-android-legacy-ever-teams.png",
"package": "ever.team",
"package": "$EXPO_PROJECT_PACKAGE_NAME",
"adaptiveIcon": {
"foregroundImage": "./assets/images/app-icon-android-adaptive-foreground-ever.png",
"backgroundImage": "./assets/images/app-icon-android-adaptive-background.png"
Expand All @@ -63,7 +63,7 @@
"ios": {
"icon": "./assets/images/app-icon-ios-ever-teams.png",
"supportsTablet": true,
"bundleIdentifier": "co.ever.teams",
"bundleIdentifier": "$EXPO_PROJECT_IOS_BUNDLE_IDENTIFIER",
"splash": {
"image": "./assets/images/splash-ever-teams.png",
"tabletImage": "./assets/images/splash-logo-ever-teams-ios-tablet.png",
Expand Down
70 changes: 19 additions & 51 deletions apps/mobile/eas.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,21 @@
{
"cli": {
"appVersionSource": "remote"
},
"build": {
"development": {
"extends": "production",
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
},
"channel": "development"
},
"preview": {
"extends": "production",
"distribution": "internal",
"channel": "preview",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
},
"production": {
"autoIncrement": true,
"channel": "production",
"env": {
"GAUZY_API_URL": "https://api.ever.team",
"INVITE_CALLBACK_URL": "https://app.ever.team/auth/passcode"
}
}
},
"submit": {
"production": {
"android": {
"track": "internal",
"releaseStatus": "draft",
"changesNotSentForReview": false
},
"ios": {
"ascAppId": "APPLE_ID_PLACEHOLDER",
"ascApiKeyIssuerId": "APPSTORE_ISSUER_ID_PLACEHOLDER",
"ascApiKeyId": "APPSTORE_API_KEY_ID_PLACEHOLDER",
"ascApiKeyPath": "./AuthKey_R9QZ5LP8NK.p8"
}
}
}
"cli": {
"version": ">= 12.5.3",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}
1 change: 1 addition & 0 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"apisauce": "3.0.0",
"axios": "^1.6.0",
"date-fns": "^2.29.2",
"eas": "^0.1.0",
"expo": "~48.0.9",
"expo-application": "~5.1.1",
"expo-blur": "~12.2.2",
Expand Down
5 changes: 5 additions & 0 deletions apps/mobile/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5924,6 +5924,11 @@ duplexify@^3.4.2, duplexify@^3.6.0:
readable-stream "^2.0.0"
stream-shift "^1.0.0"

eas@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/eas/-/eas-0.1.0.tgz#cc3c1d8f1aa9439a873670440cf946af1c5707b4"
integrity sha512-w88fTTTkfDLHwcaVW8wiYjOtnBBToguzc6AyIldD1vOrCRTKxhQEDS8oIE7nWeSJ+kCoIeoHd79Mhwvntydixg==

easy-stack@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/easy-stack/-/easy-stack-1.0.1.tgz#8afe4264626988cabb11f3c704ccd0c835411066"
Expand Down
21 changes: 21 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"cli": {
"version": ">= 12.5.3",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"resolutions": {},
"dependencies": {
"@lexical/react": "^0.8.0",
"dotenv": "^16.0.3",
"dotenv": "^16.4.5",
"lexical": "^0.8.0",
"yargs": "^17.5.0"
},
Expand Down Expand Up @@ -190,6 +190,7 @@
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.0",
"@types/detox": "^18.1.0",
"@types/electron": "^1.6.10",
"@types/node": "^20.12.2",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "5.60.1",
Expand All @@ -212,21 +213,20 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"husky": "^9.0.11",
"jimp": "^0.22.7",
"lerna": "^8.1.2",
"lerna-changelog": "^2.2.0",
"lint-staged": "^10.4.0",
"nx": "16.7.4",
"nx-cloud": "16.3.0",
"png-to-ico": "^2.1.8",
"prettier": "^3.2.5",
"prettier-eslint-cli": "^8.0.1",
"pretty-quick": "^4.0.0",
"rimraf": "^5.0.5",
"semantic-release": "^22.0.12",
"simple-git": "^3.20.0",
"ts-node": "^10.9.2",
"@types/electron": "^1.6.10",
"jimp": "^0.22.7",
"png-to-ico": "^2.1.8"
"ts-node": "^10.9.2"
},
"overrides": {
"prebuild": {
Expand Down
46 changes: 13 additions & 33 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13237,16 +13237,16 @@ dotenv-expand@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37"
integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==

dotenv@^16.0.3, dotenv@~16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

dotenv@^16.4.1:
version "16.4.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11"
integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==

dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

dotenv@^8.2.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
Expand All @@ -13262,6 +13262,11 @@ dotenv@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==

dotenv@~16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

dtrace-provider@~0.8:
version "0.8.8"
resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e"
Expand Down Expand Up @@ -24672,16 +24677,7 @@ string-to-color@^2.2.2:
lodash.words "^4.2.0"
rgb-hex "^3.0.0"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -24791,14 +24787,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -26848,7 +26837,7 @@ wordwrap@^1.0.0:
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -26866,15 +26855,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 351bf1e

Please sign in to comment.