-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathdeploy-production.yml
More file actions
61 lines (53 loc) · 1.77 KB
/
deploy-production.yml
File metadata and controls
61 lines (53 loc) · 1.77 KB
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
name: Deploy to production
on:
push:
branches: ['main']
jobs:
set_version:
name: Set version code to timestamp
environment: production
steps:
- uses: eas/checkout
- uses: eas/install_node_modules
- name: Set version code as unix timestamp
run: |
VERSION_CODE=$(date +%s)
echo "Setting version code to $VERSION_CODE"
PROJECT_ID="737e4e9e-0a70-4685-b6cd-4ac3e91b0286"
STORE_VERSION=$(node -p "require('./package.json').version")
APP_ID="com.helium.wallet.app"
for PLATFORM in IOS ANDROID; do
RESPONSE=$(curl -sf -X POST https://api.expo.dev/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EXPO_TOKEN" \
-d "{\"query\":\"mutation(\$input:AppVersionInput!){appVersion{createAppVersion(appVersionInput:\$input){id}}}\",\"variables\":{\"input\":{\"appId\":\"$PROJECT_ID\",\"platform\":\"$PLATFORM\",\"applicationIdentifier\":\"$APP_ID\",\"storeVersion\":\"$STORE_VERSION\",\"buildVersion\":\"$VERSION_CODE\"}}}")
echo "Set $PLATFORM version to $VERSION_CODE: $RESPONSE"
done
build_android:
name: Build Android
needs: [set_version]
type: build
params:
platform: android
profile: production
build_ios:
name: Build iOS
needs: [set_version]
type: build
params:
platform: ios
profile: production
submit_android:
name: Submit Android
needs: [build_android]
type: submit
params:
build_id: ${{ needs.build_android.outputs.build_id }}
profile: production
submit_ios:
name: Submit iOS
needs: [build_ios]
type: submit
params:
build_id: ${{ needs.build_ios.outputs.build_id }}
profile: production