mirror of
https://github.com/morten-olsen/bob-the-algorithm.git
synced 2026-02-08 00:46:25 +01:00
v3
This commit is contained in:
45
.github/workflows/expo-pr.yml
vendored
Normal file
45
.github/workflows/expo-pr.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Deploy Expo Preview
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
deploy_branch_preview:
|
||||
name: Deploy Branch Preview
|
||||
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-packager: yarn
|
||||
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
|
||||
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
|
||||
expo-cache: true
|
||||
- name: Cache Node Modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.cache/yarn
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Install Packages
|
||||
run: npm i -g yarn && yarn install
|
||||
- name: Expo Publish Channel
|
||||
run: expo publish --non-interactive --release-channel pr${{ github.event.number }}
|
||||
- name: Add Comment To PR
|
||||
uses: mshick/add-pr-comment@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
EXPO_PROJECT: "@${{ secrets.EXPO_CLI_USERNAME }}/bob"
|
||||
with:
|
||||
message: |
|
||||
## Application
|
||||

|
||||
Published to https://exp.host/${{ env.EXPO_PROJECT }}?release-channel=pr${{ github.event.number }}
|
||||
Reference in New Issue
Block a user