-
-
Notifications
You must be signed in to change notification settings - Fork 49
76 lines (63 loc) · 2.41 KB
/
master.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
# This is a basic workflow to help you get started with Actions
name: Publish latest
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ master ]
concurrency:
group: master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
expo-publish-latest:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 20
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: cardinalby/export-env-action@v2
with:
envFile: .env.github
- uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies (example-expo)
run: bun install
working-directory: example-expo
- name: Install dependencies (example)
run: bun install
working-directory: example
- name: Expo GitHub Action
uses: expo/expo-github-action@v8
with:
# Your Expo username, for authentication.
token: ${{ secrets.EXPO_TOKEN }}
expo-version: latest
eas-version: latest
# If Expo should be stored in the GitHub Actions cache (can be true or false)
expo-cache: true # optional
- name: Find Metro cache
id: metro-cache-dir-path
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const os = require('os');
const path = require('path');
return path.join(os.tmpdir(), 'metro-cache');
- name: Restore Metro cache
uses: actions/cache@v4
with:
path: ${{ steps.metro-cache-dir-path.outputs.result }}
key: ${{ runner.os }}-metro-cache-${{ matrix.app }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-metro-cache-${{ matrix.app }}-${{ github.base_ref }}
${{ runner.os }}-metro-cache-${{ matrix.app }}-
# Runs a set of commands using the runners shell
- name: Publish
run: bunx eas-cli@latest update --branch=master --auto -p=ios --json --non-interactive
working-directory: example-expo