Compare commits

...

3 Commits

Author SHA1 Message Date
sqj
67430a25a3 应用更新检测 2025-08-27 14:36:50 +08:00
sqj
7f971f0256 应用更新检测 2025-08-27 14:22:27 +08:00
sqj
a7d4d877a9 website 2025-08-27 14:12:48 +08:00
2 changed files with 17 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false # 如果一个任务失败,其他任务继续运行
matrix:
os: [windows-latest, macos-latest, ubuntu-latest] # 在WindowsmacOS和Ubuntu上运行任务
os: [windows-latest, macos-latest, ubuntu-latest] # 在WindowsmacOS上运行任务
steps:
- name: Check out git repository
@@ -25,58 +25,48 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22 # 安装Node.js 22
node-version: 22 # 安装Node.js 22 这里node环境是能够运行代码的环境
- name: Install Dependencies
run: |
npm i -g yarn
yarn install # 安装项目依赖
- name: Build Electron App for Windows
- name: Build Electron App for windows
if: matrix.os == 'windows-latest' # 只在Windows上运行
run: yarn run build:win # 构建Windows版应用
- name: Build Electron App for macOS
- name: Build Electron App for macos
if: matrix.os == 'macos-latest' # 只在macOS上运行
run: yarn run build:mac
run: |
yarn run build:mac
- name: Build Electron App for Linux
- name: Build Electron App for linux
if: matrix.os == 'ubuntu-latest' # 只在Linux上运行
run: yarn run build:linux
run: yarn run build:linux # 构建Linux版应用
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx del-cli "dist/*" "!dist/*.exe" "!dist/*.zip" "!dist/*.yml" # 清理Windows构建产物,只保留特定文件
- name: Cleanup Artifacts for macOS
- name: Cleanup Artifacts for MacOS
if: matrix.os == 'macos-latest'
run: |
npx del-cli "dist/*" "!dist/(*.dmg|*.zip|*.pkg|latest*.yml)" # 清理macOS构建产物
npx del-cli "dist/*" "!dist/(*.dmg|*.zip|latest*.yml)" # 清理macOS构建产物,只保留特定文件
- name: Cleanup Artifacts for Linux
if: matrix.os == 'ubuntu-latest'
run: |
npx del-cli "dist/*" "!dist/(*.AppImage|*.deb|*.rpm|*.snap|*.tar.gz|latest*.yml)" # 清理Linux构建产物
npx del-cli "dist/*" "!dist/(*.AppImage|*.deb|*.snap|latest*.yml)" # 清理Linux构建产物,只保留特定文件
- name: Upload artifacts
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: dist # 上传构建产物作为工作流artifact
release:
name: Create Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release with all files
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/**/*
- name: release
uses: softprops/action-gh-release@v1
with:
files: 'dist/**' # 将dist目录下所有文件添加到release

View File

@@ -1,6 +1,6 @@
{
"name": "ceru-music",
"version": "1.1.0",
"version": "1.0.9",
"description": "一款简洁优雅的音乐播放器",
"main": "./out/main/index.js",
"author": "sqj,wldss,star",