From c8a1c34f6b228853e356428da56a49386c333e5f Mon Sep 17 00:00:00 2001
From: Sophon <strongtz@yeah.net>
Date: Sun, 23 Jan 2022 17:23:30 +0800
Subject: [PATCH] Add release workflow

---
 .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 .github/workflows/release.yml

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..7088a60
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,57 @@
+name: release
+
+on:
+  push:
+    tags:
+      - '*'
+
+jobs:
+  build:
+    name: build_release
+    runs-on: ubuntu-latest
+
+    strategy:
+      max-parallel: 8
+      matrix:
+        device:
+          - akershus
+          - beryllium
+          - dipper
+          - draco
+          - enchilada
+          - enchilada-8g
+          - equuleus
+          - fajita
+          - fajita-8g
+          - fajita-10g
+          - judyln
+          - m1882
+          - m1892
+          - nx616j
+          - olympic
+          - pafm00
+          - pd1821
+          - perseus
+          - polaris
+          - polaris-8g
+          - skr-a0
+          - star2qltechn
+          - trident
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+
+      - name: Install requires packages
+        run: |
+          sudo apt-get update
+          sudo apt-get -y install build-essential uuid-dev iasl nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git gettext
+
+      - name: Build device ${{ matrix.device }}
+        run: |
+          ./build.sh --device ${{ matrix.device }}
+          
+      - name: Release
+        uses: softprops/action-gh-release@v1
+        with:
+          files: boot-${{ matrix.device }}.img
-- 
2.49.0