0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

モノレポでGithub連携 + EAS Workflowを使う設定方法

Posted at

概要

  • モノレポでEASのGithub連携 + EAS Workflowを設定したい

やり方

app.json, eas.jsonの配置場所

まずapp.jsonやeas.jsonはプロジェクトルートではなく、Expoアプリのルートに配置します。
※ ローカルからexpo buildなどを叩く際は必ずExpoアプリのルートから実行します。

参考: https://docs.expo.dev/build-reference/build-with-monorepos/

EAS Workflowの配置

EAS Workflowもプロジェクトルートではなく、Expoアプリのルート以下に配置します。
たとえばapps/mobile以下にExpoアプリがある場合、パスはapps/mobile/.eas/workflows/xxx.yamlになります。

name: Create Preview Builds
on:
  push:
    branches:
      - main
    paths:
      - apps/mobile/**

jobs:
  build_android:
    type: build
    environment: preview
    params:
      platform: android
  build_ios:
    type: build
    environment: preview
    params:
      platform: ios

Expoアプリのルートから以下のコマンドを叩くことでローカルからWorkflowファイルを実行させることができるので、コミット前に設定を確認可能です。

npx eas-cli@latest workflow:run xxx.yml

ExpoでGitHub連携

ExpoでGitHub連携を行います。

基本はドキュメント通りに行うだけなのですが、Base directoryでExpoアプリのあるパスを設定します。

Screenshot 2025-11-12 at 15.18.51.png

完成!

これでトリガー時にワークフローが動作するようになります。
わかれば簡単なんですがWorkflowファイルの配置場所など説明がなく試行錯誤したので記事にまとめました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?