Cody Tolene 2 лет назад
Родитель
Сommit
2d5fb934e6
2 измененных файлов с 58 добавлено и 0 удалено
  1. 36 0
      .github/workflows/deploy-main.yml
  2. 22 0
      .github/workflows/lint-pull-request.yml

+ 36 - 0
.github/workflows/deploy-main.yml

@@ -0,0 +1,36 @@
+name: "Build + upload."
+on:
+    push:
+      branches:
+          # Run on push to main.
+        - main
+    schedule:
+        # Run every day at 00:00 UTC (midnight)
+      - cron: "0 0 * * *"
+jobs:
+  ufbt-build-action:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        include:
+          - name: dev channel
+            sdk-channel: dev
+          - name: release channel
+            sdk-channel: release
+    name: 'ufbt: Build for ${{ matrix.name }}'
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          submodules: recursive
+      - name: Build with ufbt
+        uses: flipperdevices/flipperzero-ufbt-action@v0.1.2
+        id: build-app
+        with:
+          app-dir: ./src-fap
+          sdk-channel: ${{ matrix.sdk-channel }}
+      - name: Upload app artifacts
+        uses: actions/upload-artifact@v3
+        with:
+          name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}
+          path: ${{ steps.build-app.outputs.fap-artifacts }}

+ 22 - 0
.github/workflows/lint-pull-request.yml

@@ -0,0 +1,22 @@
+name: "Build test + lint."
+on: pull_request
+jobs:
+  ufbt-build-action:
+    runs-on: ubuntu-latest
+    name: 'ufbt: Build for Dev branch'
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+      - name: Build with ufbt
+        # Flipper Zero ufbt action
+        # https://github.com/flipperdevices/flipperzero-ufbt-action
+        uses: flipperdevices/flipperzero-ufbt-action@v0.1.2
+        id: build-app
+        with:
+          app-dir: ./src-fap
+          sdk-channel: dev
+      - name: Lint sources
+        uses: flipperdevices/flipperzero-ufbt-action@v0.1.2
+        with:
+          skip-setup: true
+          task: lint