Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): EAS Build config #6448

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

chore(ci): EAS Build config #6448

wants to merge 12 commits into from

Conversation

bakoushin
Copy link
Contributor

@bakoushin bakoushin commented Jan 24, 2025

Description

An example of EAS Build config for Valora, capturing its specifics:

  • gcloud auth requirement to decode secrets
  • build number is a last commit timestamp
  • pre-build checks
  • flavors (mainnet/alfajores/nightly)

Note this is a config for a bare RN app. For Expo-based app it would be slightly different.

Context: https://www.notion.so/valora-inc/Expo-Application-Services-EAS-1776b927f5ac805a9d8ef6084272d111?pvs=4#1776b927f5ac80b5b917f1c012d85586

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.11%. Comparing base (bb9c959) to head (8d9a796).
Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6448      +/-   ##
==========================================
- Coverage   89.11%   89.11%   -0.01%     
==========================================
  Files         736      734       -2     
  Lines       31911    31890      -21     
  Branches     5769     6094     +325     
==========================================
- Hits        28438    28418      -20     
+ Misses       3426     3277     -149     
- Partials       47      195     +148     

see 97 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb9c959...8d9a796. Read the comment docs.

@bakoushin bakoushin changed the title Alex/eas chore(ci): EAS Build config Jan 24, 2025
buildConfigField "String", "APP_REGISTRY_NAME", "\"${project.env.get("APP_REGISTRY_NAME")}\""
// Parentheses are required to avoid an EAS CLI bug not recognizing the product flavors
// See: https://github.com/expo/eas-cli/issues/2815
buildConfigField("String", "APP_REGISTRY_NAME", "\"${project.env.get("APP_REGISTRY_NAME")}\"")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annoying EAS bug

}
mainnetnightly {
dimension "default"
applicationId "co.clabs.valora.nightly"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise EAS doesn't know which credentials to use

"projectId": "9428af71-4fd9-462d-bf0b-a99b128a82a1"
}
},
"owner": "intera"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required to trigger the build locally, so EAS knows where to upload artifacts/look for credentials

"keys:encrypt": "bash scripts/key_placer.sh encrypt",
"eas-build-pre-install": "bash scripts/eas/pre_install.sh",
"eas-build-post-install": "bash scripts/eas/post_install.sh",
"eas-build": "bash scripts/eas/build.sh"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts are workarounds to add build steps specific to Valora


eas env:create production --non-interactive --force --name=APP_VERSION_CODE --value=$(git log -1 --format=%ct) --visibility=plaintext
eas build "$@"
eas env:delete production --non-interactive --variable-name=APP_VERSION_CODE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a hack for locally-triggered build; when triggered from GitHub, we have access to to git repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant