Skip to content

Commit

Permalink
update release action
Browse files Browse the repository at this point in the history
Signed-off-by: shanghaikid <[email protected]>
  • Loading branch information
shanghaikid committed Nov 12, 2024
1 parent 4d684c6 commit bacd903
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -25,16 +31,16 @@ 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
yarn build
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"
Expand All @@ -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: .
Expand Down

0 comments on commit bacd903

Please sign in to comment.