Browse Source

update release action

Signed-off-by: shanghaikid <jiangruiyi@gmail.com>
shanghaikid 8 months ago
parent
commit
bacd903656
1 changed files with 14 additions and 8 deletions
  1. 14 8
      .github/workflows/release.yml

+ 14 - 8
.github/workflows/release.yml

@@ -11,9 +11,15 @@ jobs:
 
     strategy:
       matrix:
-        os: [macos-latest, ubuntu-latest, windows-latest, docker]
         include:
-          - os: docker
+          - os: macos-latest
+            name: "macOS Build"
+          - os: ubuntu-latest
+            name: "Ubuntu Build"
+          - os: windows-latest
+            name: "Windows Build"
+          - os: ubuntu-latest
+            name: "Docker Build"
             platform: linux/amd64,linux/arm64,linux/arm/v7
 
     steps:
@@ -25,8 +31,8 @@ jobs:
         with:
           node-version: 22
 
-      - name: Build client (only for non-Docker OS)
-        if: matrix.os != 'docker'
+      - name: Build client (only for non-Docker jobs)
+        if: matrix.name != 'Docker Build'
         run: |
           cd client
           yarn --network-timeout 100000
@@ -34,7 +40,7 @@ jobs:
           cp -r build ../server
 
       - name: Build and Release Electron App
-        if: matrix.os != 'docker'
+        if: matrix.name != 'Docker Build'
         uses: samuelmeuli/action-electron-builder@v1
         with:
           package_root: "./server"
@@ -43,18 +49,18 @@ jobs:
           release: ${{ startsWith(github.ref, 'refs/tags/') }}
 
       - name: Set up Docker Buildx (only for Docker job)
-        if: matrix.os == 'docker'
+        if: matrix.name == 'Docker Build'
         uses: docker/setup-buildx-action@v3
 
       - name: Login to DockerHub (only for Docker job)
-        if: matrix.os == 'docker'
+        if: matrix.name == 'Docker Build'
         uses: docker/login-action@v1
         with:
           username: ${{ secrets.DOCKER_USERNAME }}
           password: ${{ secrets.DOCKER_PWD }}
 
       - name: Build and Push Docker Image
-        if: matrix.os == 'docker'
+        if: matrix.name == 'Docker Build'
         uses: docker/build-push-action@v5
         with:
           context: .