Skip to content

Commit

Permalink
Merge pull request #832 from andrew-bierman/fix-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bierman authored Apr 19, 2024
2 parents 0ffc0b8 + e3e5bb0 commit 1ad1911
Show file tree
Hide file tree
Showing 14 changed files with 349 additions and 35 deletions.
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

0 comments on commit 1ad1911

Please sign in to comment.