This repository was archived by the owner on Dec 14, 2022. It is now read-only.
forked from maisieccino/ucl-assistant-app
-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (49 loc) · 1.54 KB
/
CI.yml
File metadata and controls
54 lines (49 loc) · 1.54 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
name: build & test
on:
push:
paths-ignore:
- ".github/**"
- "README.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: 14
- uses: actions/cache@v2.1.6
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Expo GitHub Action
uses: expo/expo-github-action@5.5.1
with:
expo-token: ${{ secrets.EXPO_CLI_TOKEN }}
expo-cache: true
packager: npm
- run: echo '${{ secrets.APP_JSON }}' > app.json
# see https://github.com/expo/expo/issues/11790#issuecomment-773513299
- run: npm i -g npm@6 && npm ci
- name: codechecks
run: npx codechecks
env:
CC_SECRET: ${{ secrets.CC_SECRET }}
- run: npm run test
- run: expo doctor
- name: deploy
if: github.ref != 'refs/heads/master'
run: |
expo publish --release-channel=dev.commit-${{ github.sha }}
- uses: unsplash/comment-on-pr@master
if: github.ref != 'refs/heads/master' # don't try to comment on master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: Published to [dev.commit-${{ github.sha }}](https://expo.io/@${{ secrets.EXPO_CLI_USERNAME }}/ucl-assistant?release-channel=dev.commit-${{ github.sha }}).
continue-on-error: true