Continuous Deployment #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Deployment | |
on: | |
workflow_dispatch: | |
inputs: | |
channel: | |
type: choice | |
description: 'Channel to deploy to. The preview channel creates an internal preview build and is available for download on Expo.dev. The production channel creates a production build and uploads this build to be released in the stores. It does not make a release in the stores yet.' | |
required: true | |
options: | |
- 'preview' | |
- 'production' | |
default: 'preview' | |
platform: | |
type: choice | |
description: 'Platform to deploy to' | |
required: true | |
options: | |
- 'android' | |
- 'ios' | |
- 'all' | |
default: 'all' | |
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_PUBLISHER_ACCESS_TOKEN }} | |
- name: 📦 Install dependencies | |
run: yarn install | |
- name: 🚀 Build internal preview | |
if: ${{ github.event.inputs.channel == 'preview' }} | |
run: (cd apps/expo && eas build --non-interactive --platform ${{ github.event.inputs.platform }} --profile preview --no-wait) | |
- name: 🚀 Build and Submission to TestFlight / Alpha Track | |
if: ${{ github.event.inputs.channel == 'production' }} | |
run: (cd apps/expo && eas build --non-interactive --platform ${{ github.event.inputs.platform }} --profile production --no-wait --auto-submit) |