-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from yssk22/develop
[workflow] refactor and fixes.
- Loading branch information
Showing
10 changed files
with
313 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Debug | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dev: | ||
description: "HPAPP_CONFIG_NAME=dev" | ||
required: false | ||
type: boolean | ||
default: false | ||
beta: | ||
description: "HPAPP_CONFIG_NAME=beta" | ||
required: false | ||
type: boolean | ||
default: false | ||
prod: | ||
description: "HPAPP_CONFIG_NAME=prod" | ||
required: false | ||
type: boolean | ||
default: false | ||
env: | ||
NODE_VERSION: 22.3.0 | ||
EAS_VERSION: 13.4.2 | ||
JAVA_VERSION: 17 | ||
jobs: | ||
generate-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
target: ${{ steps.generatematrix.outputs.target }} | ||
steps: | ||
- id: generatematrix | ||
run: | | ||
inputs='${{ toJson(github.event.inputs) }}' | ||
targets=() | ||
for key in $(echo "$inputs" | jq -r 'keys[]'); do | ||
if [ "$(echo "$inputs" | jq -r ".\"$key\"")" == "true" ]; then | ||
targets+=("$key") | ||
fi | ||
done | ||
targets_str=$(printf ',"%s"' "${targets[@]}") | ||
targets_str="[${targets_str:1}]" | ||
echo "target=$targets_str" >> $GITHUB_OUTPUT | ||
build: | ||
needs: generate-matrix | ||
strategy: | ||
matrix: | ||
target: ${{ fromJson(needs.generate-matrix.outputs.target) }} | ||
runs-on: macos-latest | ||
environment: | ||
name: eas-${{ matrix.target }} | ||
steps: | ||
- run: echo ${{ matrix.target }} | ||
submit: | ||
if: ${{ github.event.inputs.beta == 'true' || github.event.inputs.prod == 'true' }} | ||
needs: [generate-matrix, build] | ||
strategy: | ||
matrix: | ||
target: ${{ fromJson(needs.generate-matrix.outputs.target) }} | ||
exclude: | ||
- target: dev | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: eas-${{ matrix.target }} | ||
steps: | ||
- run: echo ${{ matrix.target }} | ||
upload-cloud-storage: | ||
if: ${{ github.event.inputs.dev == 'true' }} | ||
needs: [generate-matrix, build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
environment: | ||
name: gcp-go | ||
steps: | ||
- run: echo dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# iOS/Android development | ||
|
||
## Install development build | ||
|
||
### for iOS | ||
|
||
Scan the QR code below or open [iTunes Link](itms-services://?action=download-manifest;url=https://storage.googleapis.com/hpapp.yssk22.dev/hpapp-dev.plist) to install the development build. | ||
|
||
![iOS QR code](https://storage.googleapis.com/hpapp.yssk22.dev/artifacts/QR-hpapp-dev.png) | ||
|
||
### for Android | ||
|
||
Scan the QR code below or open [iTunes Link](itms-services://?action=download-manifest;url=https://storage.googleapis.com/hpapp.yssk22.dev/hpapp-dev.plist) to install the development build. | ||
|
||
![Android QR](https://storage.googleapis.com/hpapp.yssk22.dev/artifacts/QR-hpapp-android-dev.png) | ||
|
||
## Start a development server | ||
|
||
```bash | ||
$ cloud_sql_proxy -instances=${GCP_PROJECT}:asia-northeast1:${GCP_DB}=tcp:3306 | ||
$ cd go | ||
$ go run ./cmd/ --prod httpserver | ||
``` | ||
|
||
## Start a metro bundler | ||
|
||
```bash | ||
$ cd expo | ||
$ yarn install | ||
$ export APP_CHECK_DEBUG_TOKEN=**** | ||
$ export GRAPHQL_ENDPOINT=http://{development_server}:8080 | ||
$ envsubst < ./.env > ./.env.local | ||
$ yarn start | ||
``` | ||
|
||
now you can launch the app on your device and connect to the metro bundler |
Oops, something went wrong.