-
Notifications
You must be signed in to change notification settings - Fork 18
60 lines (58 loc) · 2.2 KB
/
Copy pathcicd.yml
File metadata and controls
60 lines (58 loc) · 2.2 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
name: CI/CD
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
publish:
name: CI/CD
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.check_step.outputs.branch }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16.x
cache: npm
#- uses: microsoft/variable-substitution@v1
# with:
# files: './app.json'
# env:
# expo.hooks.postPublish.0.config.authToken: ${{ secrets.SENTRY_AUTH_TOKEN }}
- uses: microsoft/variable-substitution@v1
with:
files: './google-services.json'
env:
project_info.project_number: ${{ secrets.FIREBASE_PROJECT_NUMBER }}
client.0.client_info.mobilesdk_app_id: ${{ secrets.FIREBASE_MOBILESDK_APP_ID }}
client.0.oauth_client.0.client_id: ${{ secrets.FIREBASE_OAUTH_CLIENT_ID }}
client.0.api_key.0.current_key: ${{ secrets.FIREBASE_API_KEY }}
client.0.services.appinvite_service.other_platform_oauth_client.0.client_id: ${{ secrets.FIREBASE_OAUTH_CLIENT_ID }}
#- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup Expo and EAS
uses: expo/expo-github-action@v7
with:
expo-version: 5.x
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
#- run: npm test
- name: Get Current Branch
id: check_step
run: |
raw=$(git branch -r --contains ${{ github.ref }})
branch=${raw##*/}
echo "::set-output name=branch::$branch"
- name: Build on EAS and Publish to Production Channel
if: steps.check_step.outputs.branch == 'main'
run: eas build --platform all --non-interactive && expo publish --release-channel production
- name: Publish to Release Channel
if: steps.check_step.outputs.branch == 'release'
run: expo publish --release-channel release
- name: Publish to Test Channel
if: steps.check_step.outputs.branch == 'development'
run: expo publish