Giter VIP home page Giter VIP logo

expo-github-action's Introduction

expo-github-action

Publish, build or manage your Expo app with GitHub Actions!

Latest release Workflow status

Usage   —   Examples   —   Caveats   —   Changelog


What's inside?

With this Expo action, you have full access to Expo CLI and EAS CLI. It lets you automate the eas update or eas build commands, leaving you with more time to work on your project. Some additional features are included to make the usage of this action as simple as possible, like caching and authentication.

Configuration options

Create your EXPO_TOKEN GitHub secret.

This action is customizable through variables defined in the action.yml. Here is a summary of all the input options you can use.

variable default description
expo-version - Expo CLI version to install (skips when omitted)
expo-cache true If it should use the GitHub actions cache (read more)
eas-version - EAS CLI version to install (skips when omitted)
eas-cache true If it should use the GitHub actions cache (read more)
packager yarn Package manager to use (e.g. bun, yarn, or npm)
token - Token of your Expo account - get your token (use with secrets)
patch-watchers true If it should patch the fs.inotify.* limits on Ubuntu (read more)

Example workflows

Before diving into the workflow examples, you should know the basics of GitHub Actions. You can read more about this in the GitHub Actions documentation.

  1. Create new EAS Update on push to main
  2. Create new EAS build on push to main
  3. Create previews on PRs

Create new EAS Update on push to main

This workflow listens to the push event on the main branch. It sets up all required components to publish the app, including authentication with a token.

Always use secrets when using tokens.

on:
  push:
    branches:
      - main
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          cache: yarn

      - name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Create update
        run: eas update --auto --non-interactive

Creating new EAS build on push to main

This action also allows you to install the EAS CLI. To do this, add the eas-version property, and the action will install it. We recommend using latest for the EAS CLI.

The token is shared for both Expo and EAS CLI.

on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          cache: yarn

      - name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Build app
        run: eas build --non-interactive

Create previews on PRs

Reviewing pull requests can take some time. The reviewer needs to check out the branch, install the changes, and run the bundler to review the results. You can also automatically publish the project for the reviewer to skip those manual steps.

See the preview docs for more information.

on: [pull_request]
jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          cache: yarn

      - name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Create preview
        uses: expo/expo-github-action/preview@v8
        with:
          # `github.event.pull_request.head.ref` is only available on `pull_request` triggers.
          # Use your own, or keep the automatically infered branch name from `--auto`, when using different triggers.
          command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}

Things to know

Automatic Expo login

Some Expo commands, like expo publish and eas build, require you to be authenticated. This action exports the token to ensure you are authenticated in every workflow step.

Note, this action does not store the token anywhere. Each separate workflow job needs to set up the token individually.

Using the built-in cache

You can opt-out from caching the Expo and EAS CLI installations. Under the hood, it uses the @actions/cache package to restore a previous install. It reduces the installation time because it only needs to download and extract a single tar file.

Note, using cache will count towards your repo cache limit. Both the Expo and EAS CLI are stored in different caches.

ENOSPC errors on Linux

Creating new bundles with Metro can be memory intensive. In the past, some builds resulted in ENOSPC errors. To prevent anyone from running into this, we make sure Ubuntu has sensible defaults in terms of file system availability. You can opt-out from patching the file system by setting patch-watchers to false.


with ❤️ byCedric

expo-github-action's People

Contributors

bradbumbalough avatar brentvatne avatar bycedric avatar daniel avatar dependabot[bot] avatar evanbacon avatar fiberjw avatar friederbluemle avatar giautm avatar greg-hamel avatar hieronymuslex avatar hirbod avatar iamdarshshah avatar jonsamp avatar karlhorky avatar kudo avatar mccraveiro avatar mondash avatar nicholascm avatar pcowgill avatar semantic-release-bot avatar simek avatar softwarebyze avatar wschurman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

expo-github-action's Issues

Add eas.json contents as step output

Description of the feature

The action could output the eas.json contents so it can be reused by other steps

Motivation

I would like to use expo publish to the production release channel

Additional context

This is my current workaround:

      - name: 🏗 Setup Expo and EAS
        uses: expo/expo-github-action@v7

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🏗 Release channel
        uses: sergeysova/jq-action@v2
        id: releaseChannel
        with:
          cmd: 'jq .build.production.releaseChannel eas.json -r'

      - name: 🚀 Publish app
        run: expo publish --non-interactive --release-channel=${{ steps.releaseChannel.outputs.value }}

Suggested workflow:

      - name: 🏗 Setup Expo and EAS
        uses: expo/expo-github-action@v7
        id: expo

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Publish app
        run: expo publish --non-interactive --release-channel=${{ steps.expo.eas.build.production.releaseChannel }}

Switch over to main default branch

Additional context

This will probably be a breaking change, so for the next major version let's swap out master for main. Also while keeping master in the repository for people who reference this from their workflow.

Actions on Monorepo

Change de default diferectory

not success after trying alot.

name: Expo Publish
on:
  push:
    branches:
      - main
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - working-directory: app # problably wrong!
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v5
        
        with:
          expo-version: 4.x
          expo-token: ${{ secrets.EXPO_PAT }}
      - run: yarn install
      - run: expo publish

Expo publish action can't resolve module

Description of the bug

Expo publish Github action throws error Unable to Resolve module

To Reproduce

I have this config to run expo publish on each push to main branch.

name: Expo Publish
on:
  push:
    branches:
      - main
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
      - run: yarn install
      - run: expo publish

Expected behavior

Github Action to complete successfully

Actual behavior

[18:42:56] Unable to find an existing Expo CLI instance for this directory, starting a new one...
[18:42:59] Starting Metro Bundler on port 19001.
[18:43:02] Tunnel ready.
[18:43:02] Publishing to channel 'default'...
[18:43:03] Building iOS bundle
[18:44:25] Unable to resolve module `../components/Header` from `screens/Habitaciones.tsx`: 
[18:44:25] 
[18:44:25] None of these files exist:
[18:44:25]   * components/Header(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm|.ios.svg|.native.svg|.svg)
[18:44:25]   * components/Header/index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm|.ios.svg|.native.svg|.svg)
[18:44:25] › Closing Expo server
[18:44:25] Failed building JavaScript bundle.
[18:44:25] Unable to resolve "../components/Header" from "screens/Habitaciones.tsx"
[18:44:25] › Stopping Metro bundler
[18:44:25] Packager URL http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.
Error: Process completed with exit code 1.

Additional context

I am able to load the application using expo app, no errors in my local environment. I have checked that the files exists on my repo but I don't know what could be happening. I have tried to downgrade expo-cli version but still doesn't work.

Warning: The `add-path` command is deprecated and will be disabled soon

Old version

What did you find that should be changed?
When running this command the logs emit:

Warning: The add-path command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

New version

How should it look after the suggested change?
Likely this is a required fix at some point, it looks as though it allows printing secure variables.

Additional context

Can you further clarify the change? E.g., link to a dictionary or real-world examples.

This link seems to show how to do env injection without add-path
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

running expo build for iOS

assuming the flow in which expo is taking care of the entire signature and provisioning stuff for you
do you have an example of how to create an expo build:ios -t archive flow, which having the Apple Connect user/pass?

EAS submit fails in Github Action

Description of the bug

I am trying to use expo-github-action to automate submission of apps to EAS, but eas-cli is reporting an error

Error: Input is required, but stdin is not readable.

I am using remote/managed credentials from Expo server.

To Reproduce

I am using the following action configuration

name: Publish to App Store

on:
  push:
    branches:
      - main
    paths:
      - app/**

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Main
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Use Node
        uses: actions/setup-node@v2
        with:
          node-version: '16.x'
      - name: Setup Expo CLI
        uses: expo/expo-github-action@v6
        with:
          eas-version: latest
          expo-version: 4.x
          token: ${{ secrets.EXPO_TOKEN }}
      - name: Install dependencies
        run: yarn workspaces focus petka
      - name: Publish using Expo CLI
        run: cd app && eas build -p ios --auto-submit

Expected behavior

I am not sure if I missed something in the docs, but I assumed this would've built and uploaded the iOS app to the EAS server.

Periodically make new base images in CI

Description of the feature

Periodically, e.g. every week, make a new docker base image and push it to the registry.

Motivation

I think this is "fair" for all other users, that way I/we can prove the contents of the image. It's also important to keep up with all updates, so eventually we have to implement such a thing.

Additional context

I already have a docker mono repo which actually does the same thing. Maybe I can copy-paste some scripts and Travis configuration to make it happen.

PNG Import error

Description of the bug

When I import a png file, it stops running expo publish from github actions. (Local works normally).

To Reproduce

What steps did you perform which led to this issue?

  1. Added simple import to a png file on my project
  2. Click manually triggered expo action on my repo
  3. It breaks with the following message

Run expo publish

[13:46:00] › Expo SDK: 41.0.0
[13:46:00] › Release channel: default
[13:46:00] › Workflow: Managed

[13:46:00] Building optimized bundles and generating sourcemaps...
[13:46:01] Starting Metro Bundler
[13:50:51] assets/icon.png: unsupported file type: undefined (file: /home/runner/work/sysmarketing/sysmarketing/assets/icon.png)
[13:50:51] TypeError: unsupported file type: undefined (file: /home/runner/work/sysmarketing/sysmarketing/assets/icon.png)
    at lookup (/home/runner/work/sysmarketing/sysmarketing/node_modules/image-size/lib/index.js:34:9)
    at module.exports (/home/runner/work/sysmarketing/sysmarketing/node_modules/image-size/lib/index.js:122:12)
    at /home/runner/work/sysmarketing/sysmarketing/node_modules/metro/src/Assets.js:264:34
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/runner/work/sysmarketing/sysmarketing/node_modules/metro/src/Assets.js:52:24)
Error: Process completed with exit code 1.

Expected behavior

I was expecting to publish normally, as local does.

Additional context

My yml config file:

# This is a basic workflow to help you get started with Actions

name: Expo Publish

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [ master ]
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v6
        with:
          expo-version: 4.x
          token: ${{ secrets.EXPO_TOKEN  }}
      - run: yarn install
      - run: expo publish

Local versions:

node -v
v14.0.0

expo --version
4.7.3

yarn -v
1.22.10

New subactions to implement

Topic and scope of discussion

Now that we support multiple entry points, and thus "subactions", we can add multiple different actions. This should be a working draft of those subactions, and what they should do.

Required

name description
setup The original main action, taking care of Expo/EAS CLI as well as authentication
expo-build Create a new build using the classic build system
expo-publish Create a new bundle to load in Expo Go
eas-build Create a new build using EAS
qr-code Create an Expo QR code and comment on a PR or commit, should support reference to build/publish actions or by with-inputs

Optional

name description
expo-setup A simpler version of the main setup, but for Expo only
eas-setup A simpler version of the main setup, but for EAS only

Motivation

Makes using Expo in GH actions even easier.

Publish performance?

This isn't a bug per se, but I wondered if there are any recommendations for publish performance? My last build with the action took 23 minutes. The same publish locally takes maybe 2 minutes.

Caching on windows-latest Fails (v5)

Description of the bug

Caching creation fails when using the windows-latest runner.

To Reproduce

  1. Create a new job using windows-latest as the runner.
  2. Set expo-cache to true.
  3. Run the job.

Expected behavior

The cache to be created successfully.

Actual behavior

Cache creation fails: see log below.

Additional context

Partial output of the action in our workflow demonstrating the error:

saving cache path C:\hostedtoolcache\windows\expo-cli\3.27.11\x64
primary key expo-cli-win32-x64-yarn-3.27.11
C:\windows\system32\tar.exe -cz --force-local -f D:/a/_temp/003e8de7-33fb-48ca-ad3c-d9382a497fa9/cache.tgz -C C:/hostedtoolcache/windows/expo-cli/3.27.11/x64 .
tar.exe: Option --force-local is not supported
Usage:
  List:    tar.exe -tf <archive-filename>
  Extract: tar.exe -xf <archive-filename>
  Create:  tar.exe -cf <archive-filename> [filenames...]
  Help:    tar.exe --help
Warning: The process 'C:\windows\system32\tar.exe' failed with exit code 1

If I had to guess, this problem is due to using the (almost 1 year out of date) Cypress fork of the cache action. Looking at the README for this repo, I see that the fork was originally used because the official action didn't support caching for 3rd party actions. I think that it is now possible to use the official action to do this and in doing so will use the newer code in the official action which will resolve this issue.

If possible, I'd really appreciate it if you would consider updating to use the official cache action. Thanks for your hard work and your time!

bug: Insecure adding of environment variables

Description of the bug

When I run a simple action just setting up Expo and running expo doctor, it seems as GitHub is blocking this way of adding environment variables. GitHub article talking about this.

To Reproduce

  1. Make a new GitHub action
  2. Paste in the same config as I have
name: Expo CI
on: [pull_request]
jobs:
  ci:
    name: Continuous Integration
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, macos-11.0, windows-latest]
        node: [10, 12, 14]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: expo/[email protected]
        with:
          expo-version: 3.x
      - run: yarn
      - run: expo doctor
      - uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

Expected behavior

What did you expect to have happened?
A successful expo doctor and Expo setup

Actual behavior

Error: Unable to process command '::add-path::/opt/hostedtoolcache/expo-cli/3.28.6/x64/node_modules/.bin' successfully.
Error: The `add-path` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Raw logs

EAS build on main branch throwing a dirty working tree error

Description of the bug

eas build --platform ios --profile release --non-interactive --auto-submit
  shell: /usr/bin/bash -e {0}
  env:
    EXPO_TOKEN: ***

Warning! Your repository working tree is dirty.
This operation needs to be run on a clean working tree, please commit all your changes before proceeding.
    Error: Please commit all changes. Aborting...
Error: Process completed with exit code 1.

I am getting this error when following the docs. Any ideas on how this could be or how to fix it?

To Reproduce

What steps did you perform which led to this issue?

name: Expo Publish
on:
  push:
    branches:
      - production
  workflow_dispatch:

jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: "npm"

      - uses: expo/expo-github-action@v6
        with:
          eas-version: latest
          expo-cache: true
          expo-version: 4.x
          token: ${{ secrets.EXPO_TOKEN }}

      - run: npm install
      - run: expo publish
      - run: eas build --platform ios --profile release --non-interactive --auto-submit

Expected behavior

The build would succeed.

Actual behavior

The build failed with the above error.

Additional context

See YAML.

EAS build --platform all Error: Input is required, but stdin is not readable on IOS

Description of the bug

Am trying to build and app using Github Actions then probably distribute it to the store, so far everything except the part where it prompts me if i want to login to my Apple account, The action the goes ahead and throw an error Input is required, but stdin is not readable probably because of the same.

To Reproduce

What steps did you perform which led to this issue?
Configure the action as shown below.
The build will be successful for Android.

On the terminal, I get this prompt which is definately not available on the action, am using an app specific password


name: Publish to Testflight

on:
  workflow_dispatch:
    release:
      types: [created]

jobs:
  build:
    name: Create new build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v6
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}
      - run: yarn install
      - run: eas build --platform all
        env:
          EXPO_APPLE_ID: ${{secrets.EXPO_APPLE_ID}}
          EXPO_APPLE_ID_PASSWORD: ${{secrets.EXPO_APPLE_ID_PASSWORD}}

Expected behavior

  • Build ios app

Actual behavior

Excited with an error

Additional context

Can you further explain the issue? E.g., information about version/environment or screenshots.
Screenshot 2021-07-30 at 12 28 59

Running expo on a self hosted servers fails

Description of the bug

I'm trying to use your Github action on a self hosted server but it fails with this error EACCES: permission denied. It's an issue with permission. I added this before running your Github action but I got the same result (following NPM documentation):

      - name: Configure npm
        run: |
          mkdir ~/.npm-global
          npm config set prefix '~/.npm-global'
          export PATH=~/.npm-global/bin:$PATH
          source ~/.profile

It might be something related to this function toLocalCache from @actions/tool-cache

To Reproduce

Note: I'm using NodeJs v12.18.3 and npm version 6.14.6

Here is my workflow

name: Branch
on:
  push:
    branches-ignore:
      - master

jobs:
  publish:
    name: Install and publish
    runs-on: [self-hosted, linux, x64, aws-production]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      # This step is used to configure npm so it can run without
      # getting an issue of "EACCES: permission denied" while
      # installing expo as a global package
      - name: Configure npm
        run: |
          mkdir ~/.npm-global
          npm config set prefix '~/.npm-global'
          export PATH=~/.npm-global/bin:$PATH
          source ~/.profile
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-token	: ${{ secrets.EXPO_CLI_TOKEN }}
          # Used to keep the dependencies cache
          expo-cache: true
          expo-packager: npm
      - run: npm install
      - run: expo publish

Expected behavior

To run expo cli and publish the build

Actual behavior

The build fails with the following error

Error: Error: EACCES: permission denied, scandir '/home/ubuntu/actions-runner/_work/_temp/_github_home/.docker'

Additional context

It's weird that i'm getting this in the logs

npm WARN saveError ENOENT: no such file or directory, open '/home/ubuntu/actions-runner/_work/_temp/package.json'

image

image

I used the same command npm add [email protected] on GCP server and it works fine

image

I ran it also on a AWS container with the following version and it worked fine too:

With NodeJs 15.x & npm 7.x

image
image

With NodeJs 12.x & npm 6.x

image

A broken release of domhandler broke this action

Description of the bug

A broken release of domhandler broke expo-github-action.

fb55/domhandler#506

To Reproduce

What steps did you perform which led to this issue?

  1. Use expo-github-action

Expected behavior

It should work

Actual behavior

It doesnt work:

Installing Expo CLI (4.4.1) with yarn
12
  Skipping remote cache, not enabled...
13
  /usr/local/bin/yarn add [email protected]
14
  yarn add v1.22.10
15
  info No lockfile found.
16
  [1/4] Resolving packages...
17
  warning expo-cli > @hapi/[email protected]: Switch to 'npm install joi'
18
  warning expo-cli > xdl > @hapi/[email protected]: Switch to 'npm install joi'
19
  warning expo-cli > babel-runtime > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
20
  warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/formula'
21
  warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
22
  warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/pinpoint'
23
  warning expo-cli > xdl > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
24
  warning expo-cli > pacote > @npmcli/run-script > node-gyp > [email protected]: request has been deprecated, see request/request/issues/3142
25
  warning expo-cli > xdl > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
26
  warning expo-cli > xdl > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
27
  warning expo-cli > pacote > @npmcli/run-script > node-gyp > request > [email protected]: this library is no longer supported
28
  warning expo-cli > react-dev-utils > fork-ts-checker-webpack-plugin > micromatch > snapdragon > source-map-resolve > [email protected]: Please see lydell/urix#deprecated
29
  warning expo-cli > react-dev-utils > fork-ts-checker-webpack-plugin > micromatch > snapdragon > source-map-resolve > [email protected]: lydell/resolve-url#deprecated
30
  warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
31
  warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
32
  warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
33
  warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > topo > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
34
  error Couldn't find any versions for "domhandler" that matches "^4.2.0"
35
  info Visit yarnpkg.com/en/docs/cli/add for documentation about this command.
36
Error: Error: The process '/usr/local/bin/yarn' failed with exit code 1

Additional context

Version 5

Group output by collapsible items for readability

Old version

Right now, the output of the action is listed in a "flat list of text". Would be great if we can group it with collapsible items.

New version

Something like,

> Authenticated with Expo account
  - [account name]
> Skipping system patches...
  - not on linux
// or
> Applying system patches...
  - patched X
  - patched Y

Running `eas-cli` without installing dependencies crashes with unclear error

Description of the bug

When running npx eas-cli without installing the expo package (for version detection), causes an unclear error:

- Linking to project @awesomeguy/awesomeapp
✔ Linked to project @awesomeguy/awesomeapp
[expo-cli]error Command "expo" not found.
✔ Building bundle with expo-cli...
    Error: yarn exited with non-zero code: 1

To Reproduce

Just skip yarn install.

Expected behavior

Either a clear error message, or just being able to run npx eas-cli without installing the project's dependencies.

Actual behavior

See above

Additional context

No

Add support for EAS CLI installs

Topic and scope of discussion

Improved support for EAS CLI. It's not super important, bc you can just use npx eas-cli, but still might be useful to include in the github action.

Big changes

  • Make Expo CLI optional to install
  • Add optional EAS CLI install
  • Make sure caching works with both Expo and EAS CLI
  • Unify credential inputs for both Expo and EAS

Proposed inputs

old new why
expo-packager packager Users probably pick either npm or yarn, not a different one for both.
expo-patch-watchers patch-watchers This applies to the system, so both or none.
expo-username username Unify this for both Expo and EAS CLI.
expo-password password Unify this for both Expo and EAS CLI.
expo-token token Unify this for both Expo and EAS CLI.
- eas-version New, for EAS CLI
- eas-cache New, for EAS CLI
- eas-cache-key New, for EAS CLI
expo-version expo-version not changed
expo-cache expo-cache not changed
expo-cache-key expo-cache-key not changed

Other changes

input what
expo-version Defaults to null, skipping installation when not defined
eas-version Defaults to null, skipping installation when not defined

Gotcha's

  1. We can't really authenticate if neither Expo nor EAS CLI is installed. We have to add warnings/debugging for that when this happens.

ENOSPC: System limit for number of file watchers reached

Description of the bug

Basically a duplicate of expo/expo-cli#277

To Reproduce

Run expo publish using default configuration in README, with slight modifications:

  • use yarn instead of NPM
  • use a release-channel option

I don't believe these options may result in not being able to publish though.

name: Expo Review App
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - uses: expo/expo-github-action@v4
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
      - run: yarn install
      - run: expo publish --release-channel=pr-${{ github.event.number }}

Expected behavior

expo publish to succeed

Actual behavior

Following error in the expo publish ... step

ENOSPC: System limit for number of file watchers reached

Additional context

I'm curious, because you state that running expo publish is not working in the related issue, and that's actually what I see too.

However you also seem to succeed publishing using this action and default configuration 🤷‍♂

Patching system watchers for the `ENOSPC` error when running expo/expo-github-action@v6

Description of the bug

expo-github-action fails with Error: Error: The process '/usr/local/bin/yarn' failed with exit code null when running on GitHub Actions. Updating node to 16.x did not solve the issue.
#132 (comment)

Also, I tried patch-watchers: false but it resulted in an error as well. With patch-watchers: false, the below error was thrown with no detailed info.

Error: Error: The process '/usr/local/bin/yarn' failed with exit code null

To Reproduce

Running the below workflow on GitHub Actions.

name: EAS build
on:
  workflow_dispatch:

jobs:
  build:
    name: Create new build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v6
        with:
          expo-version: latest
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

Expected behavior

Runs without errors.

Actual behavior

The action fails with the following error:

Run expo/expo-github-action@v6
  with:
    expo-version: latest
    eas-version: latest
    token: ***
    expo-cache: false
    eas-cache: false
    packager: yarn
    patch-watchers: true
Installing expo-cli (5.0.3) with yarn
Installing eas-cli (0.43.0) with yarn
Checking current authenticated account
Patching system watchers for the `ENOSPC` error
  Patching system watchers for the `ENOSPC` error...
  /usr/bin/sudo sysctl fs.inotify.max_user_instances=524288
  Error: Error: The process '/usr/local/bin/yarn' failed with exit code null
  fs.inotify.max_user_instances = 524288
  /usr/bin/sudo sysctl fs.inotify.max_user_watches=524288
  fs.inotify.max_user_watches = 524288
  /usr/bin/sudo sysctl fs.inotify.max_queued_events=524288
  fs.inotify.max_queued_events = 524288
  /usr/bin/sudo sysctl -p
  vm.max_map_count = 262144

Additional context

We did not experience this error last night. I'm not actually sure if this is caused by expo-github-action, some changes to GitHub Actions, or our repo. At the moment we run eas build locally but would like to be able to build via GitHub Actions.

Input is required, but Expo CLI is in non-interactive mode.

Description of the bug

Input is required but the GitHub action runs in non-interactive mode.

Additional context

 Run yarn publish:ios5s
##[error]Process completed with exit code 1.
Run yarn publish:ios
yarn run v1.22.4
$ expo build:ios
- Making sure project is set up correctly...
[10:17:21] Checking if there is a build in progress...

[10:17:22] Fetching available credentials
[10:17:22] Unable to determine validity of Distribution Certificates.
[10:17:22] CommandError: Input is required, but Expo CLI is in non-interactive mode.
Required input:
> Distribution Certificate (Cert ID: ..., Serial number: ..., Team ID: ...)
>     used by @***/***(com.***.***)
>     ✅ Currently valid on Apple's servers. 
>  Would you like to use this certificate?
    at prompt (/[email protected]/src/prompt.ts:22:11)
    at CreateOrReuseDistributionCert.open (/[email protected]/src/credentials/views/IosDistCert.ts:277:31)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at CredentialsManager.run (/[email protected]/src/credentials/route.ts:42:12)
    at runCredentialsManager (/[email protected]/src/credentials/route.ts:13:10)
    at IOSBuilder.produceCredentials (/[email protected]/src/commands/build/ios/IOSBuilder.ts:153:7)
    at IOSBuilder.prepareCredentials (/[email protected]/src/commands/build/ios/IOSBuilder.ts:124:7)
    at IOSBuilder.run (/[email protected]/src/commands/build/ios/IOSBuilder.ts:46:7)
    at IOSBuilder.command (/[email protected]/src/commands/build/BaseBuilder.ts:29:7)
    at Command.<anonymous> (/[email protected]/src/exp.ts:85:7) {
  code: 'NON_INTERACTIVE',
  isCommandError: true
}
[10:17:23] Failed to prepare all credentials. 
The next time you build, we will automatically use the following configuration:
[10:17:23]
[10:17:23] Project Credential Configuration:
[10:17:23]   Experience: @***/***, bundle identifier: org.***.***
[10:17:23]     Provisioning profile is missing. It will be generated during the next build
[10:17:23]
[10:17:23] 
[10:17:23] Set EXPO_DEBUG=true in your env to view the stack trace.
name: Publish

on:
  push:
    branches:    
      - master

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
          expo-cache: true
      - run: yarn
      - run: yarn publish:ios
{
    "scripts": {
        "publish:ios": "expo build:ios"
    }
}

How am I able to say "yes" to the prompt here? 🤔

Could not resolve [email protected]

Description of the bug

Don't know why this action failed on the second job. The first job ran success without any issue

Error: Could not resolve [email protected], reason:
The process '/opt/hostedtoolcache/node/14.18.3/x64/bin/npm' failed with exit code 7

Additional context

Screen Shot 2022-01-20 at 20 03 49

Action stucks at publish

Description of the bug

Action stucks at publish command.
expo publish --release-channel stg

To Reproduce

This is what i'm using at Github action yaml file:

name: Expo Publish
on:
  push:
    branches:
      - stg
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
    
    - name: Extract branch name
      shell: bash
      run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
      id: extract_branch
      
    - name: Publish
      uses: actions/checkout@v2
    - uses: actions/setup-node@v2
      with:
        node-version: 14.x
    - uses: expo/expo-github-action@v6
      with:
        expo-version: 4.x
        expo-cache: true
        token: ${{ secrets.EXPO_TOKEN }}
    - run: yarn install
    - run: expo publish --release-channel ${{ steps.extract_branch.outputs.branch }}

Expected behavior

Continue and finish publishing.

Actual behavior

Everything before publish runs ok, but after that it stucks at Starting Metro Bundler log

image

Additional context

First Time of proyect running Expo with Github Actions to publish.

Request: Release new version with recent cache updates

Old version

The latest updates using the official cache action are only available in the master branch

New version

I should be able to use this action (with the recent updates to caching) with a specific tag instead instead of using the master.

Being able to run this action locally

Description of the bug

Make this GH action compatible with act

To Reproduce

Run any working workflow with act.

Expected behavior

It crashes about not being able to find a cache (I think?)

Support Expo staging environment

Description of the feature

Support the Expo staging environment, similar to setting EXPO_STAGING=1 using the CLI. Currently when using an access_token for the Staging server it fails with:

Checking current authenticated account
Error: Error: The process '/opt/hostedtoolcache/expo-cli/4.4.3/x64/node_modules/.bin/expo' failed with exit code 1

https://github.com/expo/snack/pull/132/checks?check_run_id=2467846428

example config

- uses: expo/expo-github-action@v5
        with:
          expo-version: 4.x
          expo-token: ${{ secrets.EXPO_STAGING }}
          expo-env: staging

Motivation

So we can publish the Snack runtime to both the Staging and Production environments automatically using this github action :)

Additional context

expo/snack#132

`expo publish` command fails with 404 error

For some reason, my workflow has started to fail over expo publish command.
I have not done any change recently in my flow.
here is my workflow.yml file:

name: CI Build
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_USERNAME }}
          expo-password: ${{ secrets.EXPO_PASSWORD }}
      - run: echo 'Running NPM Install'
      - run: npm ci
      - run: npm run test:ci
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          fail_ci_if_error: true
      - run: expo publish --non-interactive
        if: github.ref == 'refs/heads/master'
        env:
         EXPO_DEBUG: true

In the action log I see axios 404 error:

Run expo publish --non-interactive
[22:12:04] Unable to find an existing Expo CLI instance for this directory, starting a new one...
[22:12:06] Starting Metro Bundler on port 19001.
[22:12:06] Watch mode is not supported in this environment
[22:12:06] debug Checking for a newer version of React Native
[22:12:06] debug Current version: 0.61.4
[22:12:06] debug No release cache found
[22:12:06] debug No release cache found
[22:12:06] debug Checking for newer releases on GitHub
[22:12:06] debug No release cache found
[22:12:06] debug Saving W/"6d6386b01438c6ef0acd213d304b5839" to cache
[22:12:06] debug No release cache found
[22:12:06] debug No release cache found
[22:12:06] debug Latest release: 0.60.0
[22:12:07] Tunnel ready.
[22:12:07] Publishing to channel 'default'...
[22:12:08] Building iOS bundle
[22:13:46] Building Android bundle
[22:13:46] Finished building JavaScript bundle in 75850ms.
[22:13:46] ::ffff:127.0.0.1 - - [07/Mar/2020:22:13:46 +0000] "GET /node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&platform=ios HTTP/1.1" 200 1557910 "-" "axios/0.19.0"
[22:14:56] Analyzing assets
[22:14:56] Finished building JavaScript bundle in 70400ms.
[22:14:56] ::ffff:127.0.0.1 - - [07/Mar/2020:22:14:56 +0000] "GET /node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&platform=android HTTP/1.1" 200 1567900 "-" "axios/0.19.0"
[22:14:58] Finished building JavaScript bundle in 1635ms.
[22:14:58] ::ffff:127.0.0.1 - - [07/Mar/2020:22:14:58 +0000] "GET /node_modules/expo/AppEntry.assets?dev=false&minify=true&hot=false&platform=ios HTTP/1.1" 200 - "-" "axios/0.19.0"
[22:15:00] Finished building JavaScript bundle in 1532ms.
[22:15:00] ::ffff:127.0.0.1 - - [07/Mar/2020:22:15:00 +0000] "GET /node_modules/expo/AppEntry.assets?dev=false&minify=true&hot=false&platform=android HTTP/1.1" 200 - "-" "axios/0.19.0"
[22:15:00] Uploading assets
[22:15:00] Uploading /assets/locales/messages_en.json
[22:15:01] › Closing Expo server
[22:15:01] › Stopping Metro bundler
[22:15:01] Request failed with status code 404
[22:15:01] Error: Request failed with status code 404
    at createError (/opt/hostedtoolcache/expo-cli/3.13.2/x64/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/opt/hostedtoolcache/expo-cli/3.13.2/x64/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/opt/hostedtoolcache/expo-cli/3.13.2/x64/node_modules/axios/lib/adapters/http.js:237:11)
    at IncomingMessage.emit (events.js:323:22)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
##[error]Process completed with exit code 1.

Any ideas?

JavaScript heap out of memory error during expo publish

Basically, a duplicate of this issue: expo/expo-cli#94.

The suggested fix through env variable applies and solves the issue, e.g.:

action "Publish" {
  uses = "expo/[email protected]"
  env = {
    NODE_OPTIONS = "--max_old_space_size=4096"
  }
  args = "publish"
  secrets = ["EXPO_CLI_USERNAME", "EXPO_CLI_PASSWORD"]
}

According to the documentation the environments have up to 3.75 GB of ram: https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#runtime-environment-resources

Not sure how you would prefer to handle this, either through documentation or hardcoded within the Dockerfile?

Expo publish - basic action not working

Description of the bug

Hello all! And thanks for the awesome library.
I would like to know if it's something related to Expo, or Github actions itself.
I've set up the basic publish every push to the master repository, but i got an error when the actions is running expo publish

To Reproduce

name: Expo Publish
on:
  push:
    branches: 
      - master
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
          node-version: 12.x
    - uses: expo/expo-github-action@v5
      with:
          expo-version: latest
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
          expo-cache: true
    - run: yarn install
    - run: expo publish

Expected behavior

To publish the package

Actual behavior

This is the error
##[error]Process completed with exit code 1.

--- Edit
I've also added EXPO_DEBUG:true
and changed the expo-version to 3.13.1 but the Action is not working..

resize:  can't open terminal /dev/tty
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                          │
│   There is a new version of expo-cli available (3.13.8).                                                                                 │
│   You are currently using expo-cli 3.13.1                                                                                                │
│   Install expo-cli globally using the package manager of your choice; for example: `npm install -g expo-cli` to get the latest version   │
│                                                                                                                                          │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
[15:09:04] Publishing to channel 'default'...
[15:09:05] Building iOS bundle
[15:09:05] connect ECONNREFUSED 127.0.0.1:19003
[15:09:05] Error: connect ECONNREFUSED 127.0.0.1:19003
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)

How do you prefer to handle json file in github action?

Topic and scope of discussion

How would you summarise and scope the issue?
I am not sure how would expo like to handle the json file in github action like google-services.json.

googleServicesFile: './google-services.json',

Motivation

Why should we have this discussion?
Because some secret JSON files should not be in version control.

Additional context

image

Performance Issue

Description of the bug

It took a long time to publish a new version from the starting of the metro bundler to the complete bundle. (8 minutes)

To Reproduce

What steps did you perform which led to this issue?

Use this workflow

name: Expo Publish Prod
on:
  push:
    branches:
      - main
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v6
        with:
          expo-version: 4.x
          expo-cache: true
          token: ${{ secrets.EXPO_TOKEN }}
      - run: npm install
      - run: APP_ENV=production expo publish --release-channel prod

Expected behavior

It's very fast on local (max 1 minutes)

Actual behavior

It take 8 minutes on github actions

Additional context

The cache is activated with the expo-cache option

LOGS :

APP_ENV=production expo publish --release-channel prod

[10:14:02] › Expo SDK: 41.0.0
[10:14:02] › Release channel: prod
[10:14:02] › Workflow: Managed

[10:14:02] Building optimized bundles and generating sourcemaps...
[10:14:04] Starting Metro Bundler
[10:22:10] iOS Bundling complete 486190ms
[10:22:10]
[10:22:10] Bundle Size
┌ index.ios.js 5.47 MB
├ index.android.js 5.49 MB
├ index.ios.js.map 14.6 MB
└ index.android.js.map 14.7 MB
[10:22:10]

Upgrade to latest GitHub Actions version

Topic and scope of discussion

A summary of all changes to upgrade Expo GitHub Actions to the latest Actions version.

Motivation

From 30 Sept 2019 the old HCL syntax of GitHub Actions is deprecated. That means we have to upgrade the documentation and see if we need to make additional changes to the project.

Additional context

  • Research about Docker vs JavaScript actions
  • Research runs vs args notations in YAML
  • Replace old Docker-label metadata with YAML

Yarn support

Description of the feature

Currently, npm ci is used. Could support for yarn be added?

Motivation

A lot of folks use yarn over npm

Combine default CLI with login

Topic and scope of discussion

Simplifying the separate (sub)actions.

Motivation

I feel like the authentication logic can be simplified and merged with the actual CLI action. It will also remove the need for the publish and build actions.

Additional context

I noticed GH actions not picking up color and icons for the sub actions. Got me thinking about the simplification.

Error expo/expo-github-action@v5

Hi,

I've been using this action without any problems and today after a push, I got this error, no config was modified.

 Run expo/expo-github-action@v5
1m 18s
##[error]Error: The process '/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/.bin/expo' failed with exit code 1
Run expo/expo-github-action@v5
restoring cache /opt/hostedtoolcache/expo-cli/3.21.9/x64
primary key expo-cli-linux-x64-yarn-3.21.9
/bin/tar -xz -f /home/runner/work/_temp/5b65a535-c2cf-4ab0-bace-5a3d286c2909/cache.tgz -C /opt/hostedtoolcache/expo-cli/3.21.9/x64
Cache restored from key: expo-cli-linux-x64-yarn-3.21.9
/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/.bin/expo login --username=***
[16:43:27] Request failed with status code 504
[16:43:27] Error: Request failed with status code 504
    at createError (/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/axios/lib/adapters/http.js:237:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
##[error]Error: The process '/opt/hostedtoolcache/expo-cli/3.21.9/x64/node_modules/.bin/expo' failed with exit code 1

This is the job

  publish:
    name: Install and publish changes
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
          expo-cache: true
      - run: npm install
      - run: npm run publish

Edit:
After a rerun, it run fine, probably related to Expo servers.

How to automate expo upload:android

Hello! It's me again 😄

Topic and scope of discussion

How would you pass service account JSON to expo upload:android?

Motivation

I want to create a manually triggered Github action to automate uploads to Play Store?

Additional context

expo upload:android requires the --path to the JSON file containing the service account. I dug into the expo-cli code and they use fs.readFile to get the content so not sure how to make it available inside the Github actions. Do you know a way to provide it?

How do I get my expo-token?

Topic and scope of discussion

In the README, there is a point of:

expo-token is available from Expo CLI 3.25.0.

I am using Expo-cli 3.27.7...

% expo --version
3.27.7

However, I can find no information about a token anywhere. How do I get my hands on my Expo token so I can use it in my CI workflow?

Motivation

Why should we have this discussion?

I agree with the README that using a token is a better way to integrate with a CI/CD pipeline (like GitHub Actions) than a username and password. However, Expo docs themselves have very little information in the way of getting your hands on the token. If this feature is to be used, complete documentation needs to be available.

Additional context

Can you further explain the purpose of this discussion? E.g., screenshots or real-world examples.

Discussion about docker image account

Topic and scope of discussion

Double checking if the docker account for the base-image (cached preinstalled Expo CLI image) is fine or needs to be changed.

Motivation

Right now I've set up Travis CI to make a new image every week. It will create an image with both :latest and :2 (the major version of the CLI) tag, and push it to the registry for the Action. This will make sure that new updates of the CLI are included in the actions, without having to install it when running every action.

Since I've set things up and don't know if you guys have an Expo org or account to put it under, I used my own account (bycedric). I made it publicly visible in Travis so everyone can see that's the proper image.

Is this something that we need to change, or just stick with this for now?

Additional context

See issue #4 and PR #9.

Sharp install is failing

Description of the bug

I noticed the pipeline is having some issues with Expo CLI 2.17.x versions because of sharp. Will look into this asap.

To Reproduce

Expected behavior

Actual behavior

Additional context

Expo publish no longer exit after publish success - Github Action

Description of the bug

How would you shortly summarise the issue?

I want every PR will create a release channel, and I choose GitHub action to do that.
My environment:

node -v
v14.17.0

yarn -v
1.22.10

expo --version
4.5.2
expo-cli --version
4.5.2

My package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@eva-design/eva": "^2.1.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "^5.14.5",
    "@ui-kitten/components": "^5.1.0",
    "@ui-kitten/eva-icons": "^5.1.0",
    "expo": ">=41.0.1",
    "expo-status-bar": "~1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-reanimated": "~2.1.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.0.0",
    "react-native-svg": "^12.1.1",
    "react-native-web": "~0.13.12",
    "react-navigation": "^4.4.4",
    "tailwind-react-native-classnames": "^1.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@ui-kitten/metro-config": "^5.1.0"
  },
  "private": true,
  "engines": {
    "node": "^14.17"
  }
}

My app.json

{
  "expo": {
    "name": "newApp",
    "slug": "newApp",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "com.kokoro.le.newApp"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

My workflow.yml

name: Expo Review
on: [pull_request]
jobs:
  preReview:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 4.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}

      - name: Cache node modules
        uses: actions/cache@v2
        env:
          cache-name: cache-node-modules
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          path: ~/.npm
          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
      - name: yarn install
        run: yarn install
      - name: expo publish --release-channel=pr-${{ github.event.number }}
        run: expo publish --release-channel=pr-${{ github.event.number }}

      - uses: unsplash/comment-on-pr@master
        env:
          GITHUB_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
        with:
          msg: App is ready for review, you can [see it here](https://expo.io/${{ secrets.EXPO_CLI_USERNAME }}/use-expo?release-channel=pr-${{ github.event.number }}).

To Reproduce

What steps did you perform which led to this issue?

I create the PR on GitHub, and the Action will auto-run.
After Publish complete it not continue.

Expected behavior

What did you expect to have happened?
After Publish complete it not continue.

Actual behavior

What did it actually result in?
It took me 2 hours to take this action, when I found out it couldn't continue, I canceled this action.

Here is the full log of this action: Full log

Additional context

Can you further explain the issue? E.g., information about version/environment or screenshots.

My question is: How can I continue if Publish complete?

Sorry for my poor English.

Yarn fails

Description of the bug

When running the action with Node v14, macos-latest, this error occurs (not every time, but most of it):
Error: Error: The process '/Users/runner/.yarn/bin/yarn' failed with exit code 1

To Reproduce

What steps did you perform which led to this issue?

I created a workflow, it goes like this:

name: Expo CI
on: [pull_request]
jobs:
  ci:
    name: Continuous Integration
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, windows-latest]
        node: [10, 12, 14]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 4.x
      - run: npm i
      - run: expo doctor

Expected behavior

No error occurs

Actual behavior

What did it actually result in?

2021-02-12T14:38:08.0273380Z ##[group]Installing Expo CLI (4.1.6) with yarn
2021-02-12T14:38:08.0288640Z Skipping remote cache, not enabled...
2021-02-12T14:38:08.0417130Z [command]/Users/runner/.yarn/bin/yarn add [email protected]
2021-02-12T14:38:08.8189940Z yarn add v1.22.5
2021-02-12T14:38:08.8679670Z info No lockfile found.
2021-02-12T14:38:08.8970750Z [1/4] Resolving packages...
2021-02-12T14:38:09.4593090Z warning expo-cli > @hapi/[email protected]: Switch to 'npm install joi'
2021-02-12T14:38:09.5058700Z warning expo-cli > @expo/xdl > @hapi/[email protected]: Switch to 'npm install joi'
2021-02-12T14:38:09.8652700Z warning expo-cli > babel-runtime > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2021-02-12T14:38:09.8991510Z warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
2021-02-12T14:38:09.9033480Z warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/pinpoint'
2021-02-12T14:38:09.9044770Z warning expo-cli > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/formula'
2021-02-12T14:38:11.0679570Z warning expo-cli > @expo/xdl > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
2021-02-12T14:38:12.1255270Z warning expo-cli > @expo/xdl > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
2021-02-12T14:38:12.3808720Z warning expo-cli > @expo/xdl > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
2021-02-12T14:38:12.4063170Z warning expo-cli > pacote > @npmcli/run-script > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
2021-02-12T14:38:12.9466440Z warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2021-02-12T14:38:13.1778490Z warning expo-cli > pacote > @npmcli/run-script > node-gyp > request > [email protected]: this library is no longer supported
2021-02-12T14:38:13.4771110Z warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2021-02-12T14:38:13.4814410Z warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2021-02-12T14:38:13.4819910Z warning expo-cli > @expo/xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > joi > topo > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2021-02-12T14:38:13.5333720Z warning expo-cli > @expo/xdl > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
2021-02-12T14:38:13.5527870Z warning expo-cli > @expo/xdl > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
2021-02-12T14:38:13.9726770Z [2/4] Fetching packages...
2021-02-12T14:38:56.2468050Z info There appears to be trouble with your network connection. Retrying...
2021-02-12T14:39:29.3235010Z info There appears to be trouble with your network connection. Retrying...
2021-02-12T14:39:39.8897550Z warning [email protected]: Invalid bin field for "mini-css-extract-plugin".
2021-02-12T14:40:02.5005750Z info There appears to be trouble with your network connection. Retrying...
2021-02-12T14:40:35.6179650Z info There appears to be trouble with your network connection. Retrying...
2021-02-12T14:41:08.9699230Z error An unexpected error occurred: "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz: ESOCKETTIMEDOUT".
2021-02-12T14:41:08.9702170Z info If you think this is a bug, please open a bug report with the information provided in "/Users/runner/work/_temp/yarn-error.log".
2021-02-12T14:41:08.9705010Z info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
2021-02-12T14:42:12.5977180Z ##[endgroup]
2021-02-12T14:42:12.8645160Z ##[error]Error: The process '/Users/runner/.yarn/bin/yarn' failed with exit code 1

Fails to install eas-cli (out of memory)

Description of the bug

Step Patching system watchers for the `ENOSPC` error seemingly fails without any feedback. Started failing the last day and has previously worked just fine.

To Reproduce

Using expo/expo-github-action@v6
image

Expected behavior

No fail. Allows build to continue

Actual behavior

Runs out of memory

Installing eas-cli (0.36.1) with yarn
  Skipping remote cache, not enabled...
  /usr/local/bin/yarn add [email protected]
  yarn add v1.22.17
  warning package.json: No license field
  warning No license field
  [1/4] Resolving packages...
  [2/4] Fetching packages...
  [3/4] Linking dependencies...
  
  <--- Last few GCs --->
  
  [2019:0x4a2c6f0]    54370 ms: Scavenge 2025.0 (2053.1) -> 2023.2 (2053.1) MB, 6.8 / 0.0 ms  (average mu = 0.347, current mu = 0.353) allocation failure 
  [2019:0x4a2c6f0]    54396 ms: Scavenge 2025.6 (2053.1) -> 2024.3 (2053.1) MB, 6.9 / 0.0 ms  (average mu = 0.347, current mu = 0.353) allocation failure 
  [2019:0x4a2c6f0]    54417 ms: Scavenge 2027.0 (2061.1) -> 2025.5 (2061.1) MB, 13.9 / 0.0 ms  (average mu = 0.347, current mu = 0.353) allocation failure 
  
  
  <--- JS stacktrace --->
  
  FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
   1: 0xa389b0 node::Abort() [node]
   2: 0x96e0af node::FatalError(char const*, char const*) [node]
   3: 0xbb7a4e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
   4: 0xbb7dc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
   5: 0xd73fd5  [node]
   6: 0xd74b5f  [node]
   7: 0xd8299b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
   8: 0xd8655c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
   9: 0xd54c3b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
  10: 0x109d21f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
  11: 0x1446379  [node]
Checking current authenticated account
  /opt/hostedtoolcache/expo-cli/4.13.0/x64/node_modules/.bin/expo whoami
  Error: Error: The process '/usr/local/bin/yarn' failed with exit code null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.