about summary refs log tree commit diff
path: root/.github/workflows/bundle-deploy-eas-update.yml
blob: 72a38eaa658aab206d44bf494b61b1dc727f7945 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Bundle and Deploy EAS Update

on:
  workflow_dispatch:
    inputs:
      runtimeVersion:
        type: string
        description: Runtime version (in x.x.x format) that this update is for
        required: true

jobs:
  bundleDeploy:
    name: Bundle and Deploy EAS Update
    runs-on: ubuntu-latest
    steps:
      - name: 🧐 Validate version
        run: |
          [[ "${{ github.event.inputs.runtimeVersion }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "Version is valid" || exit 1

      - name: ⬇️ Checkout
        uses: actions/checkout@v4

      - name: 🔧 Setup Node
        uses: actions/setup-node@v4
        with:
          node-version-file: .nvmrc
          cache: yarn

      - name: ⚙️ Install Dependencies
        run: yarn install

      - name: 🪛 Install jq
        uses: dcarbone/install-jq-action@v2

      - name: ⛏️ Setup Expo
        run: yarn global add eas-cli-local-build-plugin

      - name: 🔤 Compile Translations
        run: yarn intl:build

      - name: ✏️ Write environment variables
        run: |
          export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}'
          echo "${{ secrets.ENV_TOKEN }}" > .env
          echo "$json" > google-services.json

      - name: 🏗️ Create Bundle
        run: yarn export

      - name: 📦 Package Bundle and 🚀 Deploy
        run: yarn make-deploy-bundle
        env:
          DENIS_API_KEY: ${{ secrets.DENIS_API_KEY }}
          RUNTIME_VERSION: ${{ github.event.inputs.runtimeVersion }}