Skip to content

[ENG-17052][build-tools] Add working_directory input to eas/build function group#3582

Open
szdziedzic wants to merge 1 commit intomainfrom
04-08-_eng-17052_build-tools_add_working_directory_input_to_eas_build_function_group
Open

[ENG-17052][build-tools] Add working_directory input to eas/build function group#3582
szdziedzic wants to merge 1 commit intomainfrom
04-08-_eng-17052_build-tools_add_working_directory_input_to_eas_build_function_group

Conversation

@szdziedzic
Copy link
Copy Markdown
Contributor

@szdziedzic szdziedzic commented Apr 8, 2026

Why

To support custom build workflows that check out a repository, create a new Expo app inside it, and then build that app, we need a way to override the working directory for the eas/build function group.

How

Added working_directory as an optional input to the eas/build function group via inputProviders. When provided, it's propagated to all build steps except eas/checkout (which doesn't use workingDirectory - it operates on projectSourceDirectory/projectTargetDirectory directly).

For steps that already define their own relative working directory (e.g. installPods with./ios), the directories are composed using path.join - so working_directory: ./my-app with ./ios results in my-app/ios.

Test plan

Add automated tests.

Test manually with

name: Build

on:
  workflow_dispatch:
    inputs:
      platform:
        description: 'The platform to build for.'
        type: choice
        required: true
        options:
          - android
          - ios
      profile:
        description: 'The build profile to use'
        type: string
        required: false
        default: production
      message:
        description: 'Custom message attached to the build'
        type: string
        required: false

jobs:
  build_ios:
    name: Build iOS
    type: build
    params:
      platform: ${{ inputs.platform }}
      profile: ${{ inputs.profile }}
      message: ${{ inputs.message }}
    env:
      JAVA_HOME: /opt/homebrew/opt/openjdk@17
      ANDROID_HOME: /Users/szdziedzic/Library/Android/sdk
    steps:
      - uses: eas/checkout

      - run: npx create-expo-app@latest local-testing --template blank
        name: Create Expo app in subdirectory

      - run: cd local-testing && npx -y eas-cli@latest init --id 294b6e21-a144-483b-9f94-56ffa25905f4 --non-interactive
        name: Configure EAS project

      - uses: eas/build
        with:
          working_directory: ./local-testing
Screenshot 2026-04-08 at 17 43 47

@linear
Copy link
Copy Markdown

linear bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a working_directory input to the eas/build function group so callers can run the group’s steps from a subdirectory (e.g. monorepos), while preserving step-specific directories like ./ios for CocoaPods.

Changes:

  • Introduces an optional working_directory input provider on the eas/build function group and propagates it to almost all generated steps.
  • Adds helper logic to compose the function-group working directory with step-level working directories (notably Install Pods).
  • Adds unit tests validating propagation/composition behavior across iOS/Android variants.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/build-tools/src/steps/functionGroups/build.ts Adds working_directory input handling and propagates it to generated steps; composes with step-level dirs for iOS pods.
packages/build-tools/src/steps/functionGroups/tests/build.test.ts New tests covering working directory propagation and composition across platforms/credential modes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@szdziedzic szdziedzic force-pushed the 04-08-_eng-17052_build-tools_add_working_directory_input_to_eas_build_function_group branch 2 times, most recently from 497f9f4 to 37be7c1 Compare April 8, 2026 11:03
@szdziedzic szdziedzic requested a review from Copilot April 8, 2026 11:03
@szdziedzic szdziedzic force-pushed the 04-08-_eng-17052_build-tools_add_working_directory_input_to_eas_build_function_group branch from 37be7c1 to 53645d9 Compare April 8, 2026 11:11
@szdziedzic szdziedzic marked this pull request as ready for review April 8, 2026 11:11
@szdziedzic szdziedzic requested a review from sjchmiela April 8, 2026 11:11
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

✅ Thank you for adding the changelog entry!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.43%. Comparing base (c6d4fae) to head (53645d9).

Files with missing lines Patch % Lines
...ages/build-tools/src/steps/functionGroups/build.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3582      +/-   ##
==========================================
+ Coverage   54.27%   54.43%   +0.16%     
==========================================
  Files         820      820              
  Lines       35055    35063       +8     
  Branches     7260     7262       +2     
==========================================
+ Hits        19024    19084      +60     
+ Misses      15944    15888      -56     
- Partials       87       91       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@szdziedzic szdziedzic changed the title [ENG-17052][build-tools] Add working_directory input to eas/build function group [ENG-17052][build-tools] Add working_directory input to eas/build function group Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants