728x90
시리즈 (일반 : 2번 ~ 4번 | 심화 : 5번)
- 빌드 및 배포 전체메모 : https://radpro.tistory.com/461
- 빌드 준비 (Google 설정 등) : https://radpro.tistory.com/464
- 일반 로컬 빌드 및 Google Play 배포 (Expo 빌드) : https://radpro.tistory.com/466
- EAS(Expo Application Sevice) 자동화 : https://radpro.tistory.com/463
- Git Actions 연결 : 현재 글
방법
1. 공식문서에 따라 update.yml파일을 만든다. (공식문서)
더보기
/* 1. 프로젝트 루트에 다음 경로로 파일 생성 */
.github/workflows/update.yml
/* 2. update.yml 파일 내용. 그대로 복붙 */
name: update
on: push
jobs:
update:
name: EAS Update
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: yarn
- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Find yarn cache
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Publish update
run: eas update --auto
2. Expo에서 EXPO_TOKEN을 만든다. 이름은 맘대로 만들어도 무방하다. (생성 링크)
3. 프로젝트 Github 레포지토리에서 Setting => Secrets => Actions에 들어가서 EXPO_TOKEN을 등록한다.
* 이름은 EXPO_TOKEN, 값은 2번에서 만든 Access-token값으로 저장
주의사항 (에러)
1. 로컬에서 eas login이 안되어 있거나, app.json파일에 protect_id값이 올바르게 입력되지 않으면 아래의 에러가 발생
2. app.json에는 Expo에 성절한 slug이름과 ID값을 확인하여 slug명을 입력해야함
* Expo.dev 에서 해당 프로젝트의 Overview 들어가서 확인 가능
3. app.json혹은 app.config.js 둘중 하나만 있어야함 (두개로 나누면, 둘 중 하나만 인식하여 오류발생)
error: project config: slug for project identified by "extra.eas.projectid"
error: project config: slug for project identified by "extra.eas.projectid" (앱이름) does not match the "slug" field
728x90
'React-native > 정리' 카테고리의 다른 글
[React-native] Expo 최신 버전으로 프로젝트 세팅 (JS 버전) (0) | 2023.05.01 |
---|---|
[Expo] 일반 로컬 빌드 및 Google Play 배포 (Expo 빌드) [3/5] (0) | 2023.01.01 |
[Expo] 빌드 준비 (Google 설정 등) [2/5] (0) | 2023.01.01 |
[Expo] EAS 자동 빌드 (CI/CD) [4/5] (0) | 2023.01.01 |
[Expo] 빌드 및 배포 [1/5] (1) | 2023.01.01 |