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

Add EAS android preview build workflow #832

Merged
merged 47 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f26df48
Biometric authentication
Isthisanmol Apr 4, 2024
57b3114
workflow changes
Isthisanmol Apr 5, 2024
4d710d8
Changes in expo-build
Isthisanmol Apr 6, 2024
b5272a6
Workflow changes 2
Isthisanmol Apr 6, 2024
0779fa9
Workflow changes 3
Isthisanmol Apr 6, 2024
e2034a8
Workflow changes 4
Isthisanmol Apr 6, 2024
c3e5135
Workflow changes 5
Isthisanmol Apr 6, 2024
25f25f8
add app config file for eas
Isthisanmol Apr 6, 2024
08448d6
Merge branch 'fix-workflows' of github.com:andrew-bierman/PackRat int…
Isthisanmol Apr 6, 2024
cb56049
remove app.json from git ignore
Isthisanmol Apr 7, 2024
ce7f700
remove gradle.properties from git ignore
Isthisanmol Apr 7, 2024
05dfed6
remove gradle.properties from git ignore
Isthisanmol Apr 7, 2024
7f3c5ce
remove console logs
Isthisanmol Apr 7, 2024
55a76a2
add hermesEnabled=true in gradle.properties
Isthisanmol Apr 7, 2024
e645525
Remove mapbox download token
Isthisanmol Apr 7, 2024
6ba20a4
changes in eas json and uncomment rn mapbox key field in gradle.prope…
Isthisanmol Apr 7, 2024
6782340
changes in eas json and uncomment rn mapbox key field in gradle.prope…
Isthisanmol Apr 7, 2024
14dfd5f
remove biometric code
Isthisanmol Apr 8, 2024
957fc11
Comment RIconButton in ZDropdown
Isthisanmol Apr 8, 2024
4ead074
Uncomment RIconButton in ZDropdown
Isthisanmol Apr 9, 2024
e1991dd
Upgrade react-reanimated version
Isthisanmol Apr 9, 2024
002e60f
Add preview.yml in github workflows
Isthisanmol Apr 10, 2024
17effa5
changes in github workflows
Isthisanmol Apr 10, 2024
6a2b461
changes in github workflows2
Isthisanmol Apr 10, 2024
242a32d
changes in github workflows3
Isthisanmol Apr 10, 2024
80e37c4
changes in github workflows4
Isthisanmol Apr 10, 2024
de957ab
changes in github workflows5
Isthisanmol Apr 10, 2024
b6f4c04
changes in github workflows 6
Isthisanmol Apr 10, 2024
96db9a0
changes in github workflows 7
Isthisanmol Apr 11, 2024
bb960cc
changes in github workflows8
Isthisanmol Apr 11, 2024
f9199aa
changes in github workflows9
Isthisanmol Apr 11, 2024
b0e90f2
changes in github workflows10
Isthisanmol Apr 11, 2024
f5fc859
changes in github workflows11
Isthisanmol Apr 11, 2024
f4a8083
changes in github workflows12
Isthisanmol Apr 11, 2024
1253acc
changes in github workflows13
Isthisanmol Apr 11, 2024
d8a45d6
changes in github workflow14
Isthisanmol Apr 11, 2024
29c1db7
changes in app.config
Isthisanmol Apr 11, 2024
f5e49bc
changes in workflows
Isthisanmol Apr 13, 2024
d129917
Workflow changes
Isthisanmol Apr 13, 2024
909befa
Workflow changes1
Isthisanmol Apr 13, 2024
1b8b4b0
Workflow changes2
Isthisanmol Apr 13, 2024
b1734c5
Workflow changes2.0
Isthisanmol Apr 13, 2024
fd4308d
Workflow changes2.1
Isthisanmol Apr 13, 2024
5f72507
workflow changes2.3
Isthisanmol Apr 13, 2024
68f9115
Add manual build workflow
Isthisanmol Apr 13, 2024
4f4754b
Merge remote-tracking branch 'origin/andrew_testing' into fix-workflows
Isthisanmol Apr 17, 2024
e3e5bb0
♻️ regen lock
andrew-bierman Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/android-build-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: android build manual

on:
workflow_dispatch:
inputs:
name:
description: 'Build manually'
default: 'World'
required: true
type: string

jobs:
update:
name: EAS Android Preview Build
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
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

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
working-directory: apps/expo
command: eas build --platform android --profile preview
47 changes: 47 additions & 0 deletions .github/workflows/android-preview-build-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: android-preview-build-local
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]



jobs:
update:
name: EAS Android Preview Build Local
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
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

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
working-directory: apps/expo
command: eas build --platform android --profile preview --local
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ node_modules
# dist
old/
.zip
app.json
Podfile
Podfile.lock
gradle.properties

client.zip
*.zip
.vscode
Expand Down
1 change: 0 additions & 1 deletion apps/expo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# For users to edit
app.json
.env

.expo/
Expand Down
56 changes: 56 additions & 0 deletions apps/expo/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.125.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64

# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false

# The hosted JavaScript engine
# Supported values: expo.jsEngine = "hermes" | "jsc"
expo.jsEngine=jsc

# Enable GIF support in React Native images (~200 B increase)
expo.gif.enabled=true
# Enable webp support in React Native images (~85 KB increase)
expo.webp.enabled=true
# Enable animated webp support (~3.4 MB increase)
# Disabled by default because iOS doesn't support animated webp
expo.webp.animated=false

MAPBOX_DOWNLOADS_TOKEN="MAPBOX_DOWNLOADS_TOKEN_FROM_ENV"
hermesEnabled=true
17 changes: 17 additions & 0 deletions apps/expo/app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = ({ config }) => {
return {
...config,
plugins: config.plugins.map(i => {
if (i[0] === "@rnmapbox/maps") {
return [
"@rnmapbox/maps",
{
"RNMapboxMapsImpl": "mapbox",
"RNMapboxMapsDownloadToken": process.env.MAPBOX_DOWNLOADS_TOKEN
}
]
}
return i;
})
};
};
67 changes: 67 additions & 0 deletions apps/expo/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"expo": {
"name": "packrat",
"slug": "packrat",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/packrat-app-icon.png",
"userInterfaceStyle": "automatic",
"scheme": "packrat",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff",
"scheme": "myapp"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.andrewbierman.packrat"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/packrat-app-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.andrewbierman.packrat"
},
"web": {
"favicon": "./assets/favicon.png",
"bundler": "metro"
},
"plugins": [
[
"@rnmapbox/maps",
{
"RNMapboxMapsImpl": "mapbox",
"RNMapboxMapsDownloadToken": "MAPBOX_DOWNLOADS_TOKEN_FROM_ENV"
}
],
[
"expo-document-picker",
{
"iCloudContainerEnvironment": "Production"
}
],
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
],
"extra": {
"eas": {
"projectId": "267945b1-d9ac-4621-8541-826a2c70576d"
}
},
"owner": "packrat"
}
}
2 changes: 1 addition & 1 deletion apps/expo/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export default function HomeLayout() {
/>
</Provider>
);
}
}
4 changes: 3 additions & 1 deletion apps/expo/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function (api) {

plugins: [
// NOTE: `expo-router/babel` is a temporary extension to `babel-preset-expo`.
'react-native-reanimated/plugin',
// 'react-native-reanimated/plugin',
require.resolve('expo-router/babel'),
[
'module:react-native-dotenv',
Expand Down Expand Up @@ -44,6 +44,8 @@ module.exports = function (api) {
include: 'TAMAGUI_TARGET',
},
],
'react-native-reanimated/plugin',

],
};
};
2 changes: 2 additions & 0 deletions apps/expo/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
Expand All @@ -25,6 +26,7 @@
}
}
},

"submit": {
"production": {}
}
Expand Down
3 changes: 2 additions & 1 deletion apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"expo-checkbox": "~2.4.0",
"expo-constants": "~14.4.2",
"expo-crypto": "~12.4.1",
"expo-dev-client": "~2.4.13",
"expo-document-picker": "~11.5.4",
"expo-file-system": "~15.4.4",
"expo-font": "~11.4.0",
Expand Down Expand Up @@ -119,7 +120,7 @@
"react-native-ios-utilities": "^4.3.0",
"react-native-paper": "^5.10.6",
"react-native-paper-dates": "^0.18.12",
"react-native-reanimated": "~3.3.0",
"react-native-reanimated": "~3.8.1",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-select-dropdown": "^3.3.4",
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions packages/app/screens/trip/steps.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { FontAwesome5, FontAwesome } from '@expo/vector-icons';
import { TripCard } from 'app/components/trip/TripCard';
import { WeatherCard } from 'app/components/weather/WeatherCard';
import WeatherCard from 'app/components/weather/WeatherCard';
import { GearList } from 'app/components/GearList/GearList';
import { SaveTripContainer } from 'app/components/trip/createTripModal';
import { TripDateRange } from 'app/components/trip/TripDateRange';
import TripDateRange from 'app/components/trip/TripDateRange';
import useTheme from 'app/hooks/useTheme';
import useCustomStyles from 'app/hooks/useCustomStyles';
import { useFetchWeather, useFetchWeatherWeak } from 'app/hooks/weather';
Expand Down
Loading
Loading