about summary refs log tree commit diff
path: root/.github/workflows/bundle-deploy-eas-update.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/bundle-deploy-eas-update.yml')
-rw-r--r--.github/workflows/bundle-deploy-eas-update.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/bundle-deploy-eas-update.yml b/.github/workflows/bundle-deploy-eas-update.yml
new file mode 100644
index 000000000..72a38eaa6
--- /dev/null
+++ b/.github/workflows/bundle-deploy-eas-update.yml
@@ -0,0 +1,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 }}