All Projects → expo → Expo Github Action

expo / Expo Github Action

Licence: mit
Expo CLI in your GitHub Actions workflow

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Expo Github Action

Bbrun
Run Bitbucket Pipelines locally
Stars: ✭ 127 (-54.8%)
Mutual labels:  cli, continuous-integration, continuous-delivery
Circleci Cli
Use CircleCI from the command line
Stars: ✭ 297 (+5.69%)
Mutual labels:  cli, continuous-integration, continuous-delivery
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-95.37%)
Mutual labels:  continuous-integration, continuous-delivery
hygieia
CapitalOne DevOps Dashboard
Stars: ✭ 3,697 (+1215.66%)
Mutual labels:  continuous-integration, continuous-delivery
stable-systems-checklist
An opinionated list of attributes and policies that need to be met in order to establish a stable software system.
Stars: ✭ 43 (-84.7%)
Mutual labels:  continuous-integration, continuous-delivery
bump-everywhere
🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (-91.46%)
Mutual labels:  continuous-integration, continuous-delivery
cicdstatemgr
Utility for managing CICD state, sending notifications, and mediating Slack interactive messages & slash commands across multiple flows of execution in CICD platforms such as Tekton.
Stars: ✭ 25 (-91.1%)
Mutual labels:  continuous-integration, continuous-delivery
Gauntlet
🔖 Guides, Articles, Podcasts, Videos and Notes to Build Reliable Large-Scale Distributed Systems.
Stars: ✭ 336 (+19.57%)
Mutual labels:  continuous-integration, continuous-delivery
Cyclid
An Open Source continuous integration server
Stars: ✭ 25 (-91.1%)
Mutual labels:  continuous-integration, continuous-delivery
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (-93.59%)
Mutual labels:  continuous-integration, continuous-delivery
alloy-runner
AlloyCI Runner
Stars: ✭ 16 (-94.31%)
Mutual labels:  continuous-integration, continuous-delivery
updatebot
a simple bot for updating dependencies in source code
Stars: ✭ 30 (-89.32%)
Mutual labels:  continuous-integration, continuous-delivery
noise-php
A starter-kit for your PHP project.
Stars: ✭ 52 (-81.49%)
Mutual labels:  continuous-integration, continuous-delivery
fabric-beta-publisher-plugin
DEPRECATED: A Jenkins plugin that lets you publish Android apps to Fabric Beta
Stars: ✭ 24 (-91.46%)
Mutual labels:  continuous-integration, continuous-delivery
swarmci
Swarm CI - Docker Swarm-based CI system or enhancement to existing systems.
Stars: ✭ 48 (-82.92%)
Mutual labels:  continuous-integration, continuous-delivery
workr
Simple and easy to setup job runner for any kind of automation
Stars: ✭ 15 (-94.66%)
Mutual labels:  continuous-integration, continuous-delivery
flagsmith-nodejs-client
Flagsmith Node JS Client. Flagsmith lets you manage features flags across web, mobile and server side applications. Get builds out faster. Control who has access to new features.
Stars: ✭ 13 (-95.37%)
Mutual labels:  continuous-integration, continuous-delivery
makefile-for-monorepos
A flexible and extensible makefile for monorepos with docker/docker-compose.
Stars: ✭ 115 (-59.07%)
Mutual labels:  continuous-integration, continuous-delivery
www.go.cd
Github pages repo
Stars: ✭ 39 (-86.12%)
Mutual labels:  continuous-integration, continuous-delivery
aws-cloudformation-simplified
AWS CloudFormation - Simplified | Hands On Learning !!
Stars: ✭ 51 (-81.85%)
Mutual labels:  continuous-integration, continuous-delivery

expo github action

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

releases builds license

Usage   —   Examples   —   Caveats   —   Changelog


What's inside?

With this Expo action, you have full access to the Expo CLI itself. It allows you to fully automate the expo publish or expo build process, leaving you with more time available for your project. There are some additional features included to make the usage of this action as simple as possible, like caching and authentication.

Configuration options

This action is customizable through variables; they are defined in the action.yml. Here is a summary of all the variables that you can use and their purpose.

variable default description
expo-username - The username of your Expo account (e.g. bycedric)
expo-token - The token of your Expo account (e.g. ${{ secrets.EXPO_TOKEN }})
expo-password - The password of your Expo account (e.g. ${{ secrets.EXPO_CLI_PASSWORD }})
expo-version latest The Expo CLI version to use, can be any SemVer. (e.g. 3.x)
expo-packager yarn The package manager to install the CLI with. (e.g. npm)
expo-cache false If it should use the GitHub actions (remote) cache.
expo-cache-key - An optional custom (remote) cache key. (use with caution)
expo-patch-watchers true If it should patch the fs.inotify. limits.

Never hardcode expo-token or expo-password in your workflow, use secrets to store them.

It's also recommended to set the expo-version to avoid breaking changes when a new major version is released.

Example workflows

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

  1. Publish on any push to master
  2. Cache Expo CLI for other jobs
  3. Test PRs and publish a review version
  4. Test PRs on multiple nodes and systems
  5. Test and build web every day at 08:00
  6. Authenticate using an Expo token

Publish on any push to master

Below you can see the example configuration to publish whenever the master branch is updated. The workflow listens to the push event and sets up Node 12 using the Setup Node Action. It also authenticates the Expo project by defining both expo-username and expo-password.

name: Expo Publish
on:
  push:
    branches:
      - master
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14.x
      - uses: expo/[email protected]
        with:
          expo-version: 4.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
      - run: yarn install
      - run: expo publish

Cache Expo CLI for other jobs

Below you can see a slightly modified version of the example above. In this one, we enabled the built-in cache that will reuse a previously installed Expo CLI. It skips the installation part and extracts the files directly, boosting the performance of your workflow.

You can read more about the cache here

name: Expo Publish
on:
  push:
    branches:
      - master
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14.x
      - uses: expo/[email protected]
        with:
          expo-version: 4.x
          expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
          expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
          expo-cache: true
      - run: yarn install
      - run: expo publish

Test PRs and publish a review version

Reviewing pull requests can take some time if you have to read every line of code. To make this easier, you can publish the edited version of the PR using a release channel. Below you can see an example of a workflow that publishes and comments on te PR when the app is published.

name: Expo Review
on: [pull_request]
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14.x
      - uses: expo/[email protected]
        with:
          expo-version: 4.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 }}
      - uses: unsplash/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          msg: App is ready for review, you can [see it here](https://expo.io/@bycedric/use-expo?release-channel=pr-${{ github.event.number }}).

Test PRs on multiple nodes and systems

With GitHub Actions, it's reasonably easy to set up a matrix build and test the app on multiple environments. These matrixes can help to make sure your app runs smoothly on a broad set of different development machines.

If you don't need automatic authentication, you can omit the expo-username and expo-password variables.

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, 13]
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: ${{ matrix.node }}
      - uses: expo/[email protected]
        with:
          expo-version: 4.x
      - run: yarn install
      - run: yarn test
      - run: expo doctor

Test and build web every day at 08:00

You can also schedule jobs by using the cron syntax. It can help to minimize the number of updates your users have to install.

name: Expo Daily CI
on:
  schedule:
    - cron: 0 8 * * *
jobs:
  ci:
    name: Daily Continuous Integration
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14.x
      - uses: expo/[email protected]
        with:
          expo-version: 4.x
      - run: yarn install
      - run: yarn test
      - run: expo build:web

Authenticate using an Expo token

Instead of username and password, you can also authenticate using a token. This might help increasing security and avoids adding username and password to your repository secrets.

name: Expo Publish
on:
  push:
    branches:
      - master
jobs:
  publish:
    name: Install and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          node-version: 14.x
      - uses: expo/[email protected]
        with:
          expo-version: 4.x
          expo-token: ${{ secrets.EXPO_TOKEN }}
      - run: yarn install
      - run: expo publish

Things to know

Automatic Expo login

You need to authenticate for some Expo commands like expo publish and expo build. This action gives you configuration options to keep your workflow simple. You can choose if you want to authenticate using an EXPO_TOKEN or account credentials. Under the hood, it uses the EXPO_CLI_PASSWORD environment variable to make credentials authentication as secure as possible.

Note, this action only uses your token or credentials to authenticate with Expo. It doesn't store these anywhere.

Using the built-in cache

You can opt-in to caching the installation, making it a lot faster. Under the hood, it uses the @action/cache package to restore the Expo CLI installation. This action generates a unique cache key for the OS, used packager, and exact version of the Expo CLI. If you need more control over this cache, you can define a custom cache key with expo-cache-key.

Note, this cache will count towards your repo cache limit.

ENOSPC errors on Linux

When you run expo publish or expo build, a new bundle is created. Creating these bundles require quite some resources. As of writing, GitHub actions has some small default values for the fs.inotify settings. Inside this action, we included a patch that increases these limits for the current workflow. It increases the max_user_instances, max_user_watches and max_queued_events to 524288. You can disable this patch by setting the expo-patch-watchers to false.


with ❤️ byCedric
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].