Luu 10 месяцев назад
Родитель
Сommit
838bbca22d
1 измененных файлов с 16 добавлено и 3 удалено
  1. 16 3
      .github/workflows/main.yml

+ 16 - 3
.github/workflows/main.yml

@@ -8,6 +8,7 @@ on:
     branches:
     branches:
       - main
       - main
       - dev
       - dev
+
 jobs:
 jobs:
   build:
   build:
     name: Build and Test Application
     name: Build and Test Application
@@ -15,22 +16,34 @@ jobs:
     steps:
     steps:
       - name: Checkout Repository
       - name: Checkout Repository
         uses: actions/checkout@v3
         uses: actions/checkout@v3
+
       - name: Set up Python
       - name: Set up Python
         uses: actions/setup-python@v4
         uses: actions/setup-python@v4
         with:
         with:
           python-version: '3.x'
           python-version: '3.x'
+
       - name: Install UFBT
       - name: Install UFBT
         run: |
         run: |
           python3 -m pip install --upgrade pip
           python3 -m pip install --upgrade pip
           pip install ufbt
           pip install ufbt
-      - name: Initialize UFBT Environment
+
+      - name: Initialize UFBT Environment (Dev)
+        if: github.ref == 'refs/heads/dev'
         run: |
         run: |
-          ufbt update
+          ufbt update --index-url=https://update.flipperzero.one/firmware/directory.json --channel=dev
           ufbt vscode_dist
           ufbt vscode_dist
+
+      - name: Initialize UFBT Environment (Main)
+        if: github.ref == 'refs/heads/main'
+        run: |
+          ufbt update --index-url=https://update.flipperzero.one/firmware/directory.json --channel=release
+          ufbt vscode_dist
+
       - name: Build FAP Applications
       - name: Build FAP Applications
         run: ufbt faps
         run: ufbt faps
+
       - name: Upload Build Artifacts
       - name: Upload Build Artifacts
         uses: actions/upload-artifact@v4
         uses: actions/upload-artifact@v4
         with:
         with:
           name: build-output
           name: build-output
-          path: build/
+          path: build/