-
Notifications
You must be signed in to change notification settings - Fork 4
116 lines (103 loc) · 3.85 KB
/
feature_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Feature Test
on:
# push:
# branches:
# - feat/*
# workflow_call:
workflow_dispatch:
inputs:
REALLY_UPLOAD:
required: true
type: boolean
default: true
SENTRY_DISABLE_AUTO_UPLOAD:
required: false
type: boolean
default: false
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: "[Android] Setup Java"
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: "[Android] Setup Android SDK"
uses: android-actions/setup-android@v2
- name: "[iOS] Setup Xcode"
uses: maxim-lobanov/setup-xcode@v1
id: setup-xcode
with:
# use specific version rather than 'latest-stable' if multiple Xcodes installed
xcode-version: '15.3'
- name: Install and build
shell: bash
run: |
echo "REALLY_UPLOAD value: $REALLY_UPLOAD";
yarn install;
cd apps/mobile;
bundle install;
yarn prepare-archive;
# build android
buildchannel=selfhost-reg ./scripts/deploy-android.sh
# build android
security unlock-keychain -p ${{ secrets.KEYCHAIN_PASS }} login.keychain
cd ios && bundle install && bundle exec pod install;
cd ../;
./scripts/deploy-ios-adhoc.sh
env:
KEYCHAIN_PASS: ${{ secrets.KEYCHAIN_PASS }}
RABBY_MOBILE_BUILD_BUCKET: ${{ secrets.RABBY_MOBILE_BUILD_BUCKET }}
RABBY_MOBILE_KR_PWD: ${{ secrets.RABBY_MOBILE_KR_PWD }}
RABBY_MOBILE_SENTRY_AUTH_TOKEN2: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN2 }}
SENTRY_AUTH_TOKEN: ${{ secrets.RABBY_MOBILE_SENTRY_AUTH_TOKEN2 }}
REALLY_UPLOAD: ${{ inputs.REALLY_UPLOAD }}
SENTRY_DISABLE_AUTO_UPLOAD: ${{ inputs.SENTRY_DISABLE_AUTO_UPLOAD }}
CONFIGURATION: release
TYPE: adhoc
BUILD_ENV: alpha
LARK_CHAT_URL: ${{ secrets.LARK_CHAT_URL }}
LARK_CHAT_SECRET: ${{ secrets.LARK_CHAT_SECRET }}
RABBY_ROBOT_LARK_APP_ID: ${{ secrets.RABBY_ROBOT_LARK_APP_ID }}
RABBY_ROBOT_LARK_APP_SECRET: ${{ secrets.RABBY_ROBOT_LARK_APP_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 }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }}
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 }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: rabbymobile-${{ steps.actionvars.outputs.flatten_refname }}-${{ steps.actionvars.outputs.trigger_date }}
path: |
./apps/mobile/android/app/build/outputs/apk/release/app-release.apk
./apps/mobile/ios/Package/adhoc/*.ipa
./apps/mobile/ios/Package/adhoc/manifest.plist
./apps/mobile/ios/Package/adhoc/*.zip
retention-days: 7