-
Notifications
You must be signed in to change notification settings - Fork 49
131 lines (117 loc) · 5.08 KB
/
nightly.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
on:
push:
branches:
- "release/wallet-mobile/**"
jobs:
build:
if: github.event.pull_request.draft == false
runs-on: macos-13
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install Android Tools
run: |
which sdkmanager
sdkmanager "tools"
sdkmanager --update
sdkmanager "build-tools;33.0.0" "platform-tools" "platforms;android-33" "tools"
echo "y" | sdkmanager --licenses
sdkmanager --install "ndk;23.1.7779620"
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
working-directory: 'apps/wallet-mobile'
ruby-version: '3.1.0'
bundler-cache: true
- uses: maierj/[email protected]
with:
subdirectory: 'apps/wallet-mobile'
lane: 'bump_build_android'
- uses: maierj/[email protected]
with:
subdirectory: 'apps/wallet-mobile'
lane: 'bump_build_ios'
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: ci-bot
author_email: [email protected]
message: 'chore(release): nightly'
add: '.'
- name: Install deps for ASDF
run: brew install coreutils curl git
- name: Install ASDF
run: brew install asdf
- name: Install ASDF packages
run: |
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> $HOME/.zshrc
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> $HOME/.bashrc
. /usr/local/opt/asdf/libexec/asdf.sh
cd apps/wallet-mobile
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin-add java https://github.com/halcyon/asdf-java.git
asdf plugin-add rust https://github.com/code-lever/asdf-rust.git
asdf plugin-add python
asdf install
asdf install python 2.7.13
rustup default 1.69
rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android armv7-linux-androideabi i686-linux-android wasm32-unknown-unknown x86_64-apple-ios x86_64-linux-android
bash -c -l "rustup default 1.69"
bash -l -c "rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android armv7-linux-androideabi i686-linux-android wasm32-unknown-unknown x86_64-apple-ios x86_64-linux-android"
gem install cocoapods fastlane
ruby --version
python --version
node --version
rustc --version
java --version
cargo install --version 3.1.1 cargo-lipo
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Yarn & Pod Install
run: |
. /usr/local/opt/asdf/libexec/asdf.sh
yarn install
cd apps/wallet-mobile
yarn install
npx pod-install --yes
yarn workspaces run build
- name: Copy Apple Signing Key
run: |
mkdir -p $HOME/.yoroi/ios
echo ${{secrets.APP_STORE_KEY}} | base64 -d > $HOME/.yoroi/ios/AuthKey_PH9Z89M567.p8
chmod 600 $HOME/.yoroi/ios/AuthKey_PH9Z89M567.p8
- name: Copy Android Keys
run: |
mkdir -p $HOME/.yoroi/android
echo ${{secrets.ANDROID_NIGHTLY_KEYSTORE}} | base64 -d > $HOME/.yoroi/android/nightly.keystore
chmod 600 $HOME/.yoroi/android/nightly.keystore
echo ${{secrets.ANDROID_KEYSTORE_PASS}} > $HOME/.yoroi/android/nightly.pass
echo ${{secrets.ANDROID_SERVICE_ACCOUNT_JSON}} | base64 -d > $HOME/.yoroi/android/service-account.json
- name: Copy Yoroi Certs SSH Key
run: |
mkdir -p $HOME/.ssh
echo ${{secrets.CERT_SSH_KEY}} | base64 -d > $HOME/.ssh/id_rsa
chmod 600 $HOME/.ssh/id_rsa
- name: Fastlane Deploy iOS and Android Nightly
run: |
. /usr/local/opt/asdf/libexec/asdf.sh
cd apps/wallet-mobile
export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
export ANDROID_HOME=$HOME/Library/Android/sdk
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
export PATH=$JAVA_HOME/bin:$PATH
export ANDROID_KEYSTORE_PASS="${{secrets.ANDROID_KEYSTORE_PASS}}"
export ANDROID_KEY_PASS="${{secrets.ANDROID_KEY_PASS}}"
export CI_KEYCHAIN_NAME="${{secrets.CI_KEYCHAIN_NAME}}"
export CI_KEYCHAIN_PASSWORD="${{secrets.CI_KEYCHAIN_PASSWORD}}"
export FASTLANE_PASSWORD="${{secrets.FASTLANE_PASSWORD}}"
export MATCH_PASSWORD="${{secrets.MATCH_PASSWORD}}"
fastlane ios release --env nightly
asdf global python 2.7.13
fastlane android release --env nightly