2828
2929## What's inside?
3030
31- With this Expo action, you have full access to the [ Expo CLI] [ link-expo-cli ] itself.
31+ With this Expo action, you have full access to [ Expo CLI] [ link-expo-cli ] and [ EAS CLI ] [ link-eas -cli] itself.
3232It allows you to fully automate the ` expo publish ` or ` expo build ` process, leaving you with more time available for your project.
3333There are some additional features included to make the usage of this action as simple as possible, like caching and authentication.
3434
@@ -37,38 +37,40 @@ There are some additional features included to make the usage of this action as
3737This action is customizable through variables; they are defined in the [ ` action.yml ` ] ( action.yml ) .
3838Here is a summary of all the variables that you can use and their purpose.
3939
40- variable | default | description
41- --- | --- | ---
42- ` expo-username ` | - | The username of your Expo account _ (e.g. ` bycedric ` )_
43- ` expo-token ` | - | The token of your Expo account _ (e.g. [ ` ${{ secrets.EXPO_TOKEN }} ` ] [ link-actions-secrets ] )_
44- ` expo-password ` | - | The password of your Expo account _ (e.g. [ ` ${{ secrets.EXPO_CLI_PASSWORD }} ` ] [ link-actions-secrets ] )_
45- ` expo-version ` | ` latest ` | The Expo CLI version to use, can be any [ SemVer] [ link-semver-playground ] . _ (e.g. ` 3.x ` )_
46- ` expo-packager ` | ` yarn ` | The package manager to install the CLI with. _ (e.g. ` npm ` )_
47- ` expo-cache ` | ` false ` | If it should use the [ GitHub actions (remote) cache] ( #using-the-built-in-cache ) .
48- ` expo-cache-key ` | - | An optional custom (remote) cache key. _ (** use with caution** )_
49- ` expo-patch-watchers ` | ` true ` | If it should [ patch the ` fs.inotify. ` limits] ( #enospc-errors-on-linux ) .
40+ | variable | default | description |
41+ | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
42+ | ` expo-version ` | - | [ Expo CLI] ( https://github.com/expo/expo-cli ) version to install, skips when omitted. |
43+ | ` expo-cache ` | ` false ` | If it should use the [ GitHub actions (remote) cache] ( #using-the-built-in-cache ) . |
44+ | ` expo-cache-key ` | - | An optional custom (remote) cache key. _ (** use with caution** )_ |
45+ | ` eas-version ` | - | [ EAS CLI] ( https://github.com/expo/eas-cli ) version to install, skips when omitted. (` latest ` is recommended) |
46+ | ` eas-cache ` | ` false ` | If it should use the [ GitHub actions (remote) cache] ( #using-the-built-in-cache ) . |
47+ | ` eas-cache-key ` | - | An optional custom (remote) cache key. _ (** use with caution** )_ |
48+ | ` packager ` | ` yarn ` | The package manager to use. _ (e.g. ` npm ` )_ |
49+ | ` token ` | - | The token of your Expo account _ (e.g. [ ` ${{ secrets.EXPO_TOKEN }} ` ] [ link-actions-secrets ] )_ |
50+ | ` username ` | - | The username of your Expo account _ (e.g. ` bycedric ` )_ |
51+ | ` password ` | - | The password of your Expo account _ (e.g. [ ` ${{ secrets.EXPO_CLI_PASSWORD }} ` ] [ link-actions-secrets ] )_ |
52+ | ` patch-watchers ` | ` true ` | If it should [ patch the ` fs.inotify. ` limits] ( #enospc-errors-on-linux ) . |
5053
5154> Never hardcode ` expo-token ` or ` expo-password ` in your workflow, use [ secrets] [ link-actions-secrets ] to store them.
5255
53- > It's also recommended to set the ` expo-version ` to avoid breaking changes when a new major version is released.
54-
5556## Example workflows
5657
5758Before you dive into the workflow examples, you should know the basics of GitHub Actions.
5859You can read more about this in the [ GitHub Actions documentation] [ link-actions ] .
5960
60611 . [ Publish on any push to master] ( #publish-on-any-push-to-master )
61622 . [ Cache Expo CLI for other jobs] ( #cache-expo-cli-for-other-jobs )
62- 3 . [ Test PRs and publish a review version] ( #test-prs-and-publish-a-review-version )
63- 4 . [ Test PRs on multiple nodes and systems] ( #test-prs-on-multiple-nodes-and-systems )
64- 5 . [ Test and build web every day at 08:00] ( #test-and-build-web-every-day-at-0800 )
65- 6 . [ Authenticate using an Expo token] ( #authenticate-using-an-expo-token )
63+ 3 . [ Creating a new EAS build] ( #publish-on-any-push-to-master )
64+ 4 . [ Test PRs and publish a review version] ( #test-prs-and-publish-a-review-version )
65+ 5 . [ Test PRs on multiple nodes and systems] ( #test-prs-on-multiple-nodes-and-systems )
66+ 6 . [ Test and build web every day at 08:00] ( #test-and-build-web-every-day-at-0800 )
67+ 7 . [ Authenticate using credentials] ( #authenticate-using-credentials )
6668
6769### Publish on any push to master
6870
6971Below you can see the example configuration to publish whenever the master branch is updated.
7072The workflow listens to the ` push ` event and sets up Node 12 using the [ Setup Node Action] [ link-actions-node ] .
71- It also authenticates the Expo project by defining both ` expo-username ` and ` expo-password ` .
73+ It also auto- authenticates when the ` token ` is provided .
7274
7375``` yml
7476name : Expo Publish
8890 - uses : expo/expo-github-action@v5
8991 with :
9092 expo-version : 4.x
91- expo-username : ${{ secrets.EXPO_CLI_USERNAME }}
92- expo-password : ${{ secrets.EXPO_CLI_PASSWORD }}
93+ token : ${{ secrets.EXPO_TOKEN }}
9394 - run : yarn install
9495 - run : expo publish
9596` ` `
@@ -120,13 +121,43 @@ jobs:
120121 - uses : expo/expo-github-action@v5
121122 with :
122123 expo-version : 4.x
123- expo-username : ${{ secrets.EXPO_CLI_USERNAME }}
124- expo-password : ${{ secrets.EXPO_CLI_PASSWORD }}
125124 expo-cache : true
125+ token : ${{ secrets.EXPO_TOKEN }}
126126 - run : yarn install
127127 - run : expo publish
128128` ` `
129129
130+ ### Creating a new EAS build
131+
132+ You can also install [EAS](https://docs.expo.io/eas/) CLI with this Github Action.
133+ Below we've swapped ` expo-version` with `eas-version`, but you can also use them together.
134+ Both the `token` and `username`/`password` is shared between both Expo and EAS CLI.
135+
136+ > We recommend using `latest` for `eas-version` to always have the most up-to-date version.
137+
138+ ` ` ` yml
139+ name: EAS build
140+ on:
141+ push:
142+ branches:
143+ - master
144+ jobs:
145+ build:
146+ name: Create new build
147+ runs-on: ubuntu-latest
148+ steps:
149+ - uses: actions/checkout@v2
150+ - uses: actions/setup-node@v1
151+ with:
152+ node-version: 14.x
153+ - uses: expo/expo-github-action@v5
154+ with:
155+ eas-version: latest
156+ token: ${{ secrets.EXPO_TOKEN }}
157+ - run: yarn install
158+ - run: eas build
159+ ` ` `
160+
130161# ## Test PRs and publish a review version
131162
132163Reviewing pull requests can take some time if you have to read every line of code.
@@ -148,8 +179,7 @@ jobs:
148179 - uses: expo/expo-github-action@v5
149180 with:
150181 expo-version: 4.x
151- expo-username : ${{ secrets.EXPO_CLI_USERNAME }}
152- expo-password : ${{ secrets.EXPO_CLI_PASSWORD }}
182+ token: ${{ secrets.EXPO_TOKEN }}
153183 - run: yarn install
154184 - run: expo publish --release-channel=pr-${{ github.event.number }}
155185 - uses: unsplash/comment-on-pr@master
@@ -164,7 +194,7 @@ jobs:
164194With GitHub Actions, it's reasonably easy to set up a matrix build and test the app on multiple environments.
165195These matrixes can help to make sure your app runs smoothly on a broad set of different development machines.
166196
167- > If you don't need automatic authentication, you can omit the ` expo-username` and `expo-password ` variables.
197+ > If you don't need automatic authentication, you can omit the `token ` variables.
168198
169199` ` ` yml
170200name: Expo CI
@@ -217,10 +247,10 @@ jobs:
217247 - run: expo build:web
218248` ` `
219249
220- # ## Authenticate using an Expo token
250+ # ## Authenticate using credentials
221251
222- Instead of username and password , you can also authenticate using a token .
223- This might help increasing security and avoids adding username and password to your repository secrets .
252+ Instead of using an access token , you can also authenticate using credentials .
253+ This is only possible when Expo CLI is installed .
224254
225255` ` ` yml
226256name: Expo Publish
@@ -240,7 +270,8 @@ jobs:
240270 - uses: expo/expo-github-action@v5
241271 with:
242272 expo-version: 4.x
243- expo-token: ${{ secrets.EXPO_TOKEN }}
273+ username: ${{ secrets.EXPO_CLI_USERNAME }}
274+ password: ${{ secrets.EXPO_CLI_PASSWORD }}
244275 - run: yarn install
245276 - run: expo publish
246277` ` `
@@ -263,7 +294,7 @@ Under the hood, it uses the [`@action/cache`][link-actions-cache-package] packag
263294This action generates a unique cache key for the OS, used packager, and exact version of the Expo CLI.
264295If you need more control over this cache, you can define a custom cache key with `expo-cache-key`.
265296
266- > Note, this cache will count towards your [repo cache limit][link-actions-cache-limit].
297+ > Note, this cache will count towards your [repo cache limit][link-actions-cache-limit]. The Expo and EAS CLI are stored in different caches.
267298
268299# ## ENOSPC errors on Linux
269300
@@ -272,7 +303,7 @@ Creating these bundles require quite some resources.
272303As of writing, GitHub actions has some small default values for the `fs.inotify` settings.
273304Inside this action, we included a patch that increases these limits for the current workflow.
274305It increases the `max_user_instances`, `max_user_watches` and `max_queued_events` to `524288`.
275- You can disable this patch by setting the `expo- patch-watchers` to `false`.
306+ You can disable this patch by setting the `patch-watchers` to `false`.
276307
277308<div align="center">
278309 <br />
@@ -288,4 +319,5 @@ You can disable this patch by setting the `expo-patch-watchers` to `false`.
288319[link-expo-cli] : https://docs.expo.io/workflow/expo-cli/
289320[link-expo-cli-password] : https://github.com/expo/expo-cli/blob/master/packages/expo-cli/src/accounts.ts#L88-L90
290321[link-expo-release-channels] : https://docs.expo.io/distribution/release-channels/
322+ [link-eas-cli] : https://github.com/expo/eas-cli#readme
291323[link-semver-playground] : https://semver.npmjs.com/
0 commit comments