fix: 去除其他平台构建

This commit is contained in:
imsyy
2023-11-28 11:53:47 +08:00
parent 4c34d02666
commit 1fc8cd73c8
2 changed files with 37 additions and 72 deletions

View File

@@ -1,90 +1,55 @@
name: dev build
name: Build
on:
push:
branches:
- dev
tags:
- v*
jobs:
mac_build:
runs-on: macos-latest
timeout-minutes: 30
release:
name: Build and release electron app
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Check out git repository
uses: actions/checkout@v3.0.0
- name: Setup Node.js environment
uses: actions/setup-node@v2
- name: Install Node.js
uses: actions/setup-node@v3.0.0
with:
node-version: 16.x
cache: npm
node-version: "16.x"
- name: Install Dependencies
run: npm install
- name: Build for macOS
run: npm run build:mac
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: splayer-macos
path: release/*/splayer-mac-*-universal.dmg
if-no-files-found: ignore
windows_build:
runs-on: windows-latest
timeout-minutes: 30
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: npm
- name: Install Dependencies
run: npm install
- name: Build for Windows
- name: Build Electron App
if: matrix.os == 'windows-latest'
run: npm run build:win
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Upload binaries
uses: actions/upload-artifact@v2
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx rimraf "dist/!(*.exe)"
- name: Upload artifacts
uses: actions/upload-artifact@v3.0.0
with:
name: splayer-windows
path: release/*/*Setup*.exe
if-no-files-found: ignore
name: ${{ matrix.os }}
path: dist
linux_build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
- name: Create a release
uses: softprops/action-gh-release@v0.1.14
if: startsWith(github.ref, 'refs/tags/')
with:
node-version: 16.x
cache: npm
- name: Install Dependencies
run: npm install
- name: Build for Linux
run: npm run build:linux
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: splayer-linux
path: |
splayer*.AppImage
splayer*.tar.gz
if-no-files-found: ignore
draft: true
files: "dist/**"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

View File

@@ -14,7 +14,7 @@
> - 新增支持播放与管理本地歌曲
>
- 本项目采用 [Vue 3](https://cn.vuejs.org/) 全家桶和 [Naïve UI](https://www.naiveui.com/) 组件库及 [Electron](https://www.electronjs.org/zh/docs/latest/) 开发
- 支持网页端与客户端,由于暂无其他平台,目前仅适配 `Win``Linux`
- 支持网页端与客户端,由于设备有限,目前仅适配 `Win`,其他平台可自行构建
- ~~仅对移动端做了基础适配,**不保证功能全部可用**~~
- 欢迎各位大佬指点和 `Star` 哦 😍