Skip to content

Commit

Permalink
Merge pull request #2 from robotchangzhang/mod
Browse files Browse the repository at this point in the history
Update build.yml
  • Loading branch information
robotchangzhang authored Apr 12, 2023
2 parents 83ea8f3 + eefbc49 commit 5a5df40
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Build Electron App

on:
push:
branches:
- main # 或者是您的默认分支名称
tags:
- 'v*' # 当推送一个带有 "v" 前缀的标签时触发(例如:v1.0.0)

Expand Down Expand Up @@ -33,14 +31,21 @@ jobs:
run: npm install electron-packager -g

- name: Build Electron app for Linux
run: electron-packager . --platform=linux --arch=x64 --out=dist-linux
run: |
electron-packager . --platform=linux --arch=x64 --out=dist-linux
tar -czvf dist-linux/nftqianggou-linux-x64.tar.gz -C dist-linux/nftqianggou-linux-x64 .
- name: Build Electron app for Windows
run: electron-packager . --platform=win32 --arch=x64 --out=dist-windows
run: |
electron-packager . --platform=win32 --arch=x64 --out=dist-windows
cd dist-windows && zip -r nftqianggou-win32-x64.zip nftqianggou-win32-x64 && cd ..
- name: Build Electron app for macOS
if: startsWith(github.ref, 'refs/tags/') # 可选:仅在创建新标签时构建 macOS 应用程序
run: electron-packager . --platform=darwin --arch=x64 --out=dist-macos
run: |
electron-packager . --platform=darwin --arch=x64 --out=dist-macos
cd dist-macos && zip -r nftqianggou-darwin-x64.zip nftqianggou-darwin-x64 && cd ..
- name: Create Release
id: create_release
Expand Down

0 comments on commit 5a5df40

Please sign in to comment.