-
Notifications
You must be signed in to change notification settings - Fork 39
133 lines (110 loc) · 3.93 KB
/
eas-local.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
name: EAS Local Build
on:
workflow_dispatch:
push:
branches: [ "**" ]
paths:
- 'packages/app/**'
- 'apps/expo/**'
- 'packages/ui/**'
- 'packages/config/**'
- 'packages/crosspath/**'
pull_request:
branches: [ "**" ]
paths:
- 'packages/app/**'
- 'apps/expo/**'
- 'packages/ui/**'
- 'packages/config/**'
- 'packages/crosspath/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env: # Define a shared environment variable for android and ios build.
MAPBOX_DOWNLOADS_TOKEN: ${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
EXPO_PUBLIC_CLIENT_URL: ${{ secrets.EXPO_PUBLIC_CLIENT_URL }}
EXPO_PUBLIC_API_URL: ${{ secrets.EXPO_PUBLIC_API_URL }}
EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN: ${{ secrets.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN }}
jobs:
build-android:
runs-on: ubuntu-latest
# will be used in find_or_create_comment
# and update_native_build_preview action
env:
build-name: Android APK
comment-unique-magic-prefix: '<!-- android_build_status -->'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Find or create comment for build status
if: github.event_name == 'pull_request'
uses: ./.github/actions/find-or-create-comment
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Standard Environment
uses: ./.github/actions/setup-standard-environment
with:
expo-token: ${{ secrets.EXPO_TOKEN }}
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Run Local Build for Android
id: build
working-directory: ./apps/expo
run: |
eas build --profile preview --platform android --local --non-interactive
env:
EXPO_PUBLIC_ANDROID_CLIENT_ID: ${{ secrets.EXPO_PUBLIC_ANDROID_CLIENT_ID }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: android-apk
path: /home/runner/work/PackRat/PackRat/apps/expo/build-*.apk
- name: Update build status
if: always() && github.event_name == 'pull_request'
uses: ./.github/actions/update-native-preview-build-status
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-outcome: ${{ steps.build.outcome }}
build-ios:
runs-on: macos-latest
env:
build-name: iOS IPA
comment-unique-magic-prefix: '<!-- ios_build_status -->'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Find or create comment for build status
if: github.event_name == 'pull_request'
uses: ./.github/actions/find-or-create-comment
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Standard Environment
uses: ./.github/actions/setup-standard-environment
with:
expo-token: ${{ secrets.EXPO_TOKEN }}
# - name: Setup Xcode
# uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: latest-stable
- name: Run Local Build for iOS
id: build
working-directory: ./apps/expo
run: |
export MAPBOX_DOWNLOADS_TOKEN=${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
eas build --profile preview --platform ios --local --non-interactive
env:
EXPO_PUBLIC_IOS_CLIENT_ID: ${{ secrets.EXPO_PUBLIC_IOS_CLIENT_ID }}
- name: Upload IPA
uses: actions/upload-artifact@v3
with:
name: ios-ipa
path: /Users/runner/work/PackRat/PackRat/apps/expo/build-*.ipa
- name: Update build status
if: always() && github.event_name == 'pull_request'
uses: ./.github/actions/update-native-preview-build-status
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-outcome: ${{ steps.build.outcome }}