-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (75 loc) · 2.33 KB
/
ci.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
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: write
steps:
- uses: actions/checkout@v4
- name: Dependabot metadata
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- name: Check if it is a dependency that should be managed by Expo
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const script = require(`./scripts/check-expo-dependencies.js`);
await script({
context,
github,
fetch,
dependencyNames: `${{ steps.dependabot-metadata.outputs.dependency-names }}`
});
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: yarn
- run: yarn lint
- run: yarn typecheck
- run: npx expo-doctor
- run: yarn test
automerge:
needs: build
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@v3
eas-update:
needs: build
if: github.actor != 'dependabot[bot]'
uses: ./.github/workflows/expo-eas-update.yml
with:
channel: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'preview' }}
message: ${{ github.event.head_commit.message || github.event.pull_request.title }}
secrets:
expo-token: ${{ secrets.EXPO_TOKEN }}
build-ios:
needs: build
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[OPTIC-RELEASE-AUTOMATION]')
uses: ./.github/workflows/expo-eas-build.yml
with:
profile: production
platform: ios
secrets:
expo-token: ${{ secrets.EXPO_TOKEN }}
build-android:
needs: build
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[OPTIC-RELEASE-AUTOMATION]')
uses: ./.github/workflows/expo-eas-build.yml
with:
profile: production
platform: android
secrets:
expo-token: ${{ secrets.EXPO_TOKEN }}