forked from BirthdayResearch/defichain-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (136 loc) · 5.08 KB
/
eas-publish.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: EAS Publish
on:
release:
types: [ created ]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version:
name: Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.result }}
steps:
- uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e
id: version
with:
script: |
const semver = context.ref.replace('refs/tags/v', '')
if (semver.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
return semver
}
throw new Error('not semver')
result-encoding: string
eas-release-android:
name: EAS Release Android
environment: EAS Release
runs-on: ubuntu-latest
needs: [ version ]
steps:
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854
with:
node-version: 16
- uses: expo/expo-github-action@f98a64c8874c4a163514273f34306f403e962350
with:
eas-version: latest
expo-version: 4.x
packager: npm
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: |
git config --global user.email "[email protected]"
git config --global user.name "defichain-bot"
npx standard-version --release-as ${{needs.version.outputs.version}}
- name: EAS Build - Android
run: eas build --platform android --non-interactive --wait
- run: sleep 10s
- name: EAS Submit - Android - Setup
run: echo "$ANDROID_SERVICE_ACCOUNT_JSON" > ANDROID_SERVICE_ACCOUNT.json
env:
ANDROID_SERVICE_ACCOUNT_JSON: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
- name: EAS Submit - Android - Submit
run: eas submit --platform android --latest
- name: EAS Submit - Android - Cleanup
run: rm ANDROID_SERVICE_ACCOUNT.json
if: always()
# TODO(thedoublejay): remove once migration process
eas-release-ios-legacy:
name: EAS Release iOS Legacy
environment: EAS Release
runs-on: ubuntu-latest
needs: [ version ]
steps:
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854
with:
node-version: 16
- uses: expo/expo-github-action@f98a64c8874c4a163514273f34306f403e962350
with:
eas-version: latest
expo-version: 4.x
packager: npm
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: |
git config --global user.email "[email protected]"
git config --global user.name "defichain-bot"
npx standard-version --release-as ${{needs.version.outputs.version}}
- name: EAS Build - iOS - Legacy
run: eas build --platform ios --non-interactive --wait
- run: sleep 10s
# TODO(fuxingloh): replace this in the future
- name: EAS Submit - iOS - Legacy - Setup
run: |
sed -i "s/EAS_APPLE_ID/$APPLE_ID/" eas.json
sed -i "s/EAS_ASC_APP_ID/$ASC_APP_ID/" eas.json
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
ASC_APP_ID: ${{ secrets.ASC_APP_ID }}
- name: EAS Submit - iOS - Legacy - Submit
run: eas submit --platform ios --latest
env:
EXPO_APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_SPECIFIC_PASSWORD }}
- name: EAS Submit - iOS - Cleanup
run: rm eas.json
if: always()
eas-release-ios-new:
name: EAS Release iOS New
environment: EAS iOS New Release
runs-on: ubuntu-latest
needs: [ version ]
steps:
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236
with:
node-version: 16
- uses: expo/expo-github-action@1bde34e5c788ddc62e8d0fa9fc2dea222cdcaae1
with:
eas-version: latest
expo-version: 4.x
packager: npm
token: ${{ secrets.EXPO_TOKEN }}
- run: npm ci
- run: |
git config --global user.email "[email protected]"
git config --global user.name "defichain-bot"
npx standard-version --release-as ${{needs.version.outputs.version}}
- name: EAS Build - iOS - New
run: eas build --platform ios --non-interactive --wait --profile=ios_production
- run: sleep 10s
# TODO(fuxingloh): replace this in the future
- name: EAS Submit - iOS - New - Setup
run: |
sed -i "s/EAS_APPLE_ID/$APPLE_ID/" eas.json
sed -i "s/EAS_ASC_APP_ID/$ASC_APP_ID/" eas.json
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
ASC_APP_ID: ${{ secrets.ASC_APP_ID }}
- name: EAS Submit - iOS - New - Submit
run: eas submit --platform ios --latest
env:
EXPO_APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_SPECIFIC_PASSWORD }}
- name: EAS Submit - iOS - Cleanup
run: rm eas.json
if: always()