Skip to content

Commit

Permalink
[WIP]build: support github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardo2016x committed Mar 12, 2024
1 parent 722f004 commit d1427e3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test

on:
push:
branches:
- dev
- feat*
- ci/*

defaults:
run:
shell: bash -ieo pipefail {0}

jobs:
setup:
name: Build
strategy:
matrix:
host: [macOS]
runs-on:
- self-hosted
- mobile
- ${{ matrix.host }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'

steps:
- name: Checkout git repo
uses: actions/checkout@v3

- name: Env Test
id: env-test
shell: bash
run: |
echo "whoami $(whoami)"
echo "shell is $(echo $0)"
echo "HOME is $HOME"
echo "which node $(which node)"
- name: Install and build
shell: bash
run: |
npm i -g @debank/cli@latest;
cd apps/mobile;
yarn install;
yarn apply-patch;
yarn prepare-archive;
security unlock-keychain -p ${{ secrets.KEYCHAIN_PASS }} ~/Library/Keychains/login.keychain-db
env:
KEYCHAIN_PASS: ${{ secrets.KEYCHAIN_PASS }}
RABBY_BUILD_BUCKET: ${{ secrets.RABBY_BUILD_BUCKET }}
RABBY_MOBILE_KR_PWD: ${{ secrets.RABBY_DESKTOP_KR_PWD }}
RABBY_REALLY_COPY: ${{ vars.RABBY_REALLY_COPY }}
LARK_CHAT_URL: ${{ secrets.LARK_CHAT_URL }}
LARK_CHAT_SECRET: ${{ secrets.LARK_CHAT_SECRET }}
# see more details on https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
GIT_ACTIONS_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GIT_COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
GIT_REF_NAME: ${{ github.ref_name }}
GIT_REF_URL: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }}
GITHUB_REF: ${{ github.ref }}
1 change: 1 addition & 0 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"syncrnversion:incb": "./node_modules/.bin/react-native-version --never-amend",
"syncrnversion": "./node_modules/.bin/react-native-version --never-amend --never-increment-build",
"start": "yarn ensure-git-hooks && yarn build:deps && yarn build-inpage && react-native start",
"prepare-archive": "yarn build:deps && yarn build-inpage",
"test": "jest",
"build-inpage": "sh ./scripts/postinstall.sh",
"create-patch": "sh ./scripts/create-patch.sh",
Expand Down

0 comments on commit d1427e3

Please sign in to comment.