Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(continuous-deploy-fingerprint): Add optional environment input for EAS updates #316

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 61 additions & 13 deletions build/continuous-deploy-fingerprint/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions build/preview-build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions build/preview/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 18 additions & 14 deletions continuous-deploy-fingerprint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
## Overview

`continuous-deploy-fingerprint` is a GitHub Action continuously deploys an Expo project using the expo-updates fingerprint runtime version policy. When run, it performs the following tasks in order, once for each platform:

1. Check current fingerprint of the project.
2. Check for EAS builds with specified profile matching that fingerprint.
3. If a in-progress or finished EAS build doesn't exist, start one.
Expand All @@ -55,27 +56,29 @@
This action is customizable through variables defined in the [`action.yml`](action.yml).
Here is a summary of all the input options you can use.

| variable | default | description |
| --------------------- | -------------- | ---------------------------------------------------------------------------- |
| **profile** | (required) | The EAS Build profile to use |
| **branch** | (required) | The EAS Update branch on which to publish |
| **working-directory** | - | The relative directory of your Expo app |
| **platform** | `all` | The platform to deploy on (available options are `ios`, `android` and `all`) |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |
| variable | default | description |
| --------------- | ---------- | ------------------------------------------------------------------------ |
| **profile** | (required) | The EAS Build profile to use |
| **branch** | (required) | The EAS Update branch on which to publish |
| **environment** | - | The environment to use for server-side defined EAS environment variables |

| **working-directory** | - | The relative directory of your Expo app |
| **platform** | `all` | The platform to deploy on (available options are `ios`, `android` and `all`) |
| **github-token** | `github.token` | GitHub token to use when commenting on PR ([read more](#github-tokens)) |

And the action will generate these [outputs](#available-outputs) for other actions to do something based on what this action did.

### Available outputs

In case you want to reuse this action for other purpose, this action will set the following action outputs.

| output name | description |
| ------------------------ | ------------------------------ |
| **ios-fingerprint** | The iOS fingerprint of the current commit. |
| **android-fingerprint** | The Android fingerprint of the current commit. |
| **android-build-id** | ID for Android EAS Build if one was started. |
| **ios-build-id** | ID for iOS EAS Build if one was started. |
| **update-output** | The output (JSON) from the `eas update` command. |
| output name | description |
| ----------------------- | ------------------------------------------------ |
| **ios-fingerprint** | The iOS fingerprint of the current commit. |
| **android-fingerprint** | The Android fingerprint of the current commit. |
| **android-build-id** | ID for Android EAS Build if one was started. |
| **ios-build-id** | ID for iOS EAS Build if one was started. |
| **update-output** | The output (JSON) from the `eas update` command. |

## Caveats

Expand All @@ -93,6 +96,7 @@ You can read more about this in the [GitHub Actions documentation][link-actions]
### Continuously deploy after tests on main branch and pull requests

This workflow continuously deploys:

- main branch -> production EAS Build profile and EAS Update branch
- PR branches -> development EAS Build profile and EAS Update branch

Expand Down
3 changes: 3 additions & 0 deletions continuous-deploy-fingerprint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
branch:
description: The EAS Update branch on which to publish.
required: true
environment:
description: The environment to use for server-side defined EAS environment variables during command execution
required: false
platform:
description: The platform on which to publish. Possible values are 'all' | 'android' | 'ios'
required: false
Expand Down
Loading
Loading