Skip to content

Commit

Permalink
Fock it.
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Dec 25, 2023
0 parents commit 33f7b8a
Show file tree
Hide file tree
Showing 937 changed files with 143,806 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-P ubuntu-latest=catthehacker/ubuntu:full-latest
--container-architecture linux/amd64
73 changes: 73 additions & 0 deletions .easignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# All this file is doing is making sure hiddenwebview.html and provider.html
# are sent to expo's (EAS) servers when building the mobile app

!hiddenwebview.html
!provider.html

# Everything below this line is just a copy of the root .gitignore ------------------

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
build/
web-build/

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.parcel-cache

npm-debug.log*
yarn-debug.log*
yarn-error.log*

ledger-injection.js
.rollup.cache
dist/
.turbo
.env
.idea
test-ledger/

.expo
.next

*-e

.eslintcache
.js.map
.d.ts.map
.tsbuildinfo

.dev.vars
.tamagui
.d.ts
.d.ts.map

# Not using zero-installs
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Local Netlify folder
.netlify
docker
web
examples
packages/app-extension
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/node_modules/**
**/dist/**
**/build/**
**/dev/**

**/.expo/**
**/.next/**
**/__generated__/**
./scripts/*.ts
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ["custom"],
ignorePatterns: ["**/*.js"],
parserOptions: {
project: ["./tsconfig.eslint.json", "./packages/*/tsconfig.json"],
},
};
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
30 changes: 30 additions & 0 deletions .github/actions/app-mobile-monorepo-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: app-mobile monorepo setup

inputs:
eas-version:
description: Version of EAS CLI to use
default: latest

expo-token:
description: Expo token to authenticate with
required: false

runs:
using: composite
steps:
- name: πŸ— Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: πŸ— Setup Expo
uses: expo/expo-github-action@v7
with:
eas-version: ${{ inputs.eas-version }}
# expo-version: ${{ inputs.expo-version }}
token: ${{ inputs.expo-token }}

- name: πŸ“¦ Install dependencies
run: yarn install --immutable
shell: bash
39 changes: 39 additions & 0 deletions .github/actions/build-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build setup
description: Prepare everything before running 'yarn build'

runs:
using: composite
steps:
##########################################################################
# Setup environment.
##########################################################################

#
# Fetch submodule files and prepare for yarn install
#
- run: git submodule update --init && rm -f packages/trek-api-web-ts/yarn.lock
shell: bash

#
# Make sure react-native package.json key is added if used in mobile
#
- name: "check-package-json-react-native.sh: chmod"
run: chmod +x ./scripts/check-package-json-react-native.sh
shell: bash

- name: "Run check-package-json-react-native.sh"
run: ./scripts/check-package-json-react-native.sh
shell: bash

##########################################################################
# Yarn install.
##########################################################################

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: yarn install
run: yarn install --immutable
shell: bash
69 changes: 69 additions & 0 deletions .github/workflows/app-mobile-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: app-mobile build

on:
workflow_dispatch:
inputs:
platform:
description: Platform to build for (all/android/ios/native/web)
type: choice
required: true
default: native
options:
- all
- native
- android
- ios
- web
profile:
description: EAS build profile (development/production/preview)
type: choice
required: true
default: development
options:
- development
- production
- preview
app_env:
description: APP_ENV (development/production)
type: choice
required: true
default: development
options:
- development
- production

jobs:
mobile:
name: Build App
timeout-minutes: 70
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
# Checkout must come before a custom action
- name: πŸ— Setup repository
uses: actions/checkout@v3

- name: πŸ— Setup monorepo
uses: ./.github/actions/app-mobile-monorepo-setup
with:
expo-token: ${{ secrets.EXPO_TOKEN }}

- name: πŸ‘· Build modules
env:
BACKPACK_CONFIG_VERSION: "${{ env.RELEASE_PREFIX }}-latest-beta-${{ github.run_number }}"
BACKPACK_CONFIG_LOG_LEVEL: "info"
BACKPACK_FEATURE_LIGHT_MODE: "true"
BACKPACK_FEATURE_POP_MODE: "true"
BACKPACK_FEATURE_XNFT: "true"
# CI!=true so that build warnings aren't treated like errors (for now)
CI: ""
run: yarn build:mobile

- name: πŸš€ Build mobile
working-directory: packages/app-mobile
env:
APP_ENV: ${{ github.event.inputs.app_env }}
run: eas build --non-interactive --wait --platform=${{ github.event.inputs.platform }} --profile=${{ github.event.inputs.profile }}
89 changes: 89 additions & 0 deletions .github/workflows/app-mobile-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: app-mobile preview

on:
workflow_dispatch:
inputs:
# platform:
# description: Platform to build for (all/android/ios/native/web)
# type: choice
# required: true
# default: native
# options:
# - all
# - native
# - android
# - ios
# - web
# profile:
# description: EAS build profile (development/production/preview)
# type: choice
# required: true
# default: development
# options:
# - development
# - production
# - preview
app_env:
description: APP_ENV (development/production)
type: choice
required: true
default: development
options:
- development
- production
# pull_request:
# paths:
# - "packages/app-mobile/**"
# types: [opened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
mobile:
name: Preview App
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
# Checkout must come before a custom action
- name: πŸ— Setup repository
uses: actions/checkout@v3

- name: πŸ— Setup monorepo
uses: ./.github/actions/app-mobile-monorepo-setup
with:
expo-token: ${{ secrets.EXPO_TOKEN }}

- name: πŸ‘· Build modules
env:
BACKPACK_CONFIG_VERSION: "${{ env.RELEASE_PREFIX }}-latest-beta-${{ github.run_number }}"
BACKPACK_CONFIG_LOG_LEVEL: "info"
BACKPACK_FEATURE_LIGHT_MODE: "true"
BACKPACK_FEATURE_POP_MODE: "true"
BACKPACK_FEATURE_XNFT: "true"
# CI!=true so that build warnings aren't treated like errors (for now)
CI: ""
run: yarn build:mobile

- name: πŸš€ Publish preview
working-directory: packages/app-mobile
env:
APP_ENV: "production"
COMMIT_HASH: ${{ github.sha }}
run: eas update --branch preview --message=${{ github.sha }}

# - name: πŸ’¬ Comment preview
# uses: expo/expo-github-action/preview-comment@v7
# with:
# comment: false
# project: packages/app-mobile
# channel: pr-${{ github.event.number }}

# - name: πŸ’¬ Comment in Slack
# uses: slackapi/[email protected]
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
# with:
# channel-id: mobile-app
# slack-message: 'New deployment is ready!\n- Preview: ${{ steps.preview.outputs.projectQR }}'
Loading

0 comments on commit 33f7b8a

Please sign in to comment.