Skip to content

Commit

Permalink
Refactor monorepo (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzulabo authored Aug 10, 2021
1 parent 58a043e commit 510debb
Show file tree
Hide file tree
Showing 333 changed files with 32,733 additions and 31,624 deletions.
5 changes: 1 addition & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
**/node_modules
**/dist

**/*.js
**/jest.config.ts
**/dist
60 changes: 35 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
project: ['*/**/tsconfig.json'],
env: {
node: true,
es6: true,
},
settings: {
react: {
version: '17.0.1',
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@stencil/recommended',
'prettier',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
extends: ['eslint:recommended', 'prettier'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
project: ['tsconfig.json', '*/**/tsconfig.json'],
},
settings: {
react: {
version: '17.0.1',
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@stencil/recommended',
'prettier',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'@stencil/decorators-style': 'off',
'@stencil/required-jsdoc': 'off',
'@stencil/strict-boolean-conditions': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'@stencil/decorators-style': 'off',
'@stencil/required-jsdoc': 'off',
'@stencil/strict-boolean-conditions': 'off',
'@typescript-eslint/no-floating-promises': 'error',

'require-await': 'off',
'@typescript-eslint/require-await': 'warn',
},
'require-await': 'off',
'@typescript-eslint/require-await': 'warn',
},
},
],
};
19 changes: 10 additions & 9 deletions .github/workflows/build-client-android-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,27 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- uses: ./.github/workflows/build-client-android-setup
- uses: ./.github/workflows/build-setup
with:
_APPENV_TS: ${{ secrets._APPENV_TS }}
_ANDROID_CUSTOM_PROPS: ${{ secrets._ANDROID_CUSTOM_PROPS }}
_GOOGLE_SERVICES_JSON: ${{ secrets._GOOGLE_SERVICES_JSON }}
BUILD_VALUES: ${{ secrets.BUILD_VALUES }}
id: build_setup

- run: npm run build.android -w packages/client

- run: ./gradlew assembleDebug
working-directory: ./client/android
working-directory: ./packages/client/android

- uses: actions/upload-artifact@v2
with:
name: announcing-debug.apk
path: ./client/android/app/build/outputs/apk/debug/app-debug.apk
path: ./packages/client/android/app/build/outputs/apk/debug/app-debug.apk

- run: >-
npm_config_yes=true npx firebase-tools
appdistribution:distribute
./client/android/app/build/outputs/apk/debug/app-debug.apk
./packages/client/android/app/build/outputs/apk/debug/app-debug.apk
--app ${APP_ID}
--groups testers
env:
FIREBASE_TOKEN: ${{ secrets._FIREBASE_TOKEN }}
APP_ID: ${{ secrets._FIREBASE_APP_ID_ANDROID }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
APP_ID: ${{ steps.build_setup.outputs.FIREBASE_APP_ID_ANDROID }}
23 changes: 8 additions & 15 deletions .github/workflows/build-client-android-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,20 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- uses: ./.github/workflows/build-client-android-setup
- uses: ./.github/workflows/build-setup
with:
_APPENV_TS: ${{ secrets._APPENV_TS }}
_ANDROID_CUSTOM_PROPS: ${{ secrets._ANDROID_CUSTOM_PROPS }}
_GOOGLE_SERVICES_JSON: ${{ secrets._GOOGLE_SERVICES_JSON }}
BUILD_VALUES: ${{ secrets.BUILD_VALUES }}
id: build_setup

- run: echo "$V" > client/play-console-account.json
env:
V: ${{ secrets._PLAY_CONSOLE_ACCOUNT_JSON }}

- run: echo -n "$_ANDROID_UPLOAD_KEYSTORE_JKS_BASE64" | base64 -d > client/upload-keystore.jks
env:
_ANDROID_UPLOAD_KEYSTORE_JKS_BASE64: ${{ secrets._ANDROID_UPLOAD_KEYSTORE_JKS_BASE64 }}
- run: npm run build.android -w packages/client

- run: ./gradlew publishReleaseBundle
working-directory: ./client/android
working-directory: ./packages/client/android
env:
KEYSTORE_PASSWORD: ${{ secrets._ANDROID_KEYSTORE_PASSWORD }}
KEYSTORE_UPLOAD_KEY_PASSWORD: ${{ secrets._ANDROID_KEYSTORE_UPLOAD_KEY_PASSWORD }}
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEYSTORE_UPLOAD_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_UPLOAD_KEY_PASSWORD }}

- uses: actions/upload-artifact@v2
with:
name: announcing-release.aab
path: ./client/android/app/build/outputs/bundle/release/app-release.aab
path: ./packages/client/android/app/build/outputs/bundle/release/app-release.aab
11 changes: 4 additions & 7 deletions .github/workflows/build-client-ios-adhoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ jobs:
- uses: ./.github/workflows/provisioning-profile-setup
with:
APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD }}
PP_PATH: 'secrets/Ad_Hoc.mobileprovision'

- run: npm install
working-directory: ./client
PP_PATH: 'tools/secrets/Ad_Hoc.mobileprovision'

- run: npm run build.ios
working-directory: ./client
working-directory: ./packages/client

- run: >-
xcodebuild
Expand All @@ -49,7 +46,7 @@ jobs:
-archivePath $RUNNER_TEMP/announcing.xcarchive
-exportPath $RUNNER_TEMP/announcing.ipa
-exportOptionsPlist ../../ios-export-adhoc.plist
working-directory: ./client/ios/App
working-directory: ./packages/client/ios/App
env:
PP_SPECIFIER: ${{ steps.build_setup.outputs.AD_HOC_PROVISION_NAME }}
BUNDLE_IDENTIFIER: ${{ steps.build_setup.outputs.AD_HOC_APPID }}
Expand All @@ -68,7 +65,7 @@ jobs:
--app ${APP_ID}
--groups testers
env:
FIREBASE_TOKEN: ${{ secrets._FIREBASE_TOKEN }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
APP_ID: ${{ steps.build_setup.outputs.FIREBASE_APP_ID_IOS }}
- name: Clean up keychain and provisioning profile
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/build-firebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build-firebase

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'

- uses: ./.github/workflows/build-setup
with:
BUILD_VALUES: ${{ secrets.BUILD_VALUES }}
id: build_setup

- run: npm run deploy.prepare
working-directory: ./packages/firebase

- run: npm run deploy
working-directory: ./packages/firebase
env:
FIREBASE_TOKEN: ${{ secrets._FIREBASE_TOKEN }}
14 changes: 10 additions & 4 deletions .github/workflows/build-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ runs:
using: 'composite'

steps:
- id: build_version
run: node .github/workflows/build_version.js
- run: npm i -g npm@7
shell: bash

- run: npm install
- run: npm ci
shell: bash

- id: extract_secrets
run: npm run secrets.extract
run: npm run extract -w tools/secrets
shell: bash
env:
BUILD_VALUES: ${{ inputs.BUILD_VALUES }}

- run: npm run build:shared
shell: bash

- id: build_version
run: node .github/workflows/build_version.js
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/provisioning-profile-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
PP_PATH: ${{ inputs.PP_PATH }}
run: |
# create variables
CERTIFICATE_PATH=secrets/AppleDistribution.p12
CERTIFICATE_PATH=tools/secrets/AppleDistribution.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
KEYCHAIN_PASSWORD=$(openssl rand -base64 12)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/

.DS_Store
10 changes: 0 additions & 10 deletions client/android/.idea/runConfigurations.xml

This file was deleted.

21 changes: 0 additions & 21 deletions client/android/capacitor.settings.gradle

This file was deleted.

14 changes: 0 additions & 14 deletions client/copy-shared.js

This file was deleted.

25 changes: 0 additions & 25 deletions client/ios/App/Podfile

This file was deleted.

Loading

0 comments on commit 510debb

Please sign in to comment.