Add tag publish firmware
authorHan Gao <gaohan@iscas.ac.cn>
Sat, 27 Jan 2024 11:11:02 +0000 (11:11 +0000)
committerHan Gao <gaohan@iscas.ac.cn>
Sat, 27 Jan 2024 11:11:02 +0000 (11:11 +0000)
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
.github/workflows/build.yml

index 9ba95cfa8217fe83b8b2265f719ce9c4d73ad6c5..16749283130df026df627c988ce17d6a6065bc5d 100644 (file)
@@ -2,6 +2,10 @@ name: thead-u-boot-build
 
 on:
   push:
+    tags:
+      - '*'
+    branches:
+      - '*'
   pull_request:
   workflow_dispatch:
   schedule:
@@ -124,3 +128,10 @@ jobs:
           name: thead-u-uboot-${{ matrix.name }}
           path: output/*.bin
           retention-days: 30
+
+      - name: 'Create release by tag'
+        uses: softprops/action-gh-release@v1
+        if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.name == 'thead-gcc' }}
+        with:
+          files: output/*.bin
+          token: ${{ secrets.GITHUB_TOKEN }}