mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 11:29:26 +08:00
fix: 去除其他平台构建
This commit is contained in:
107
.github/workflows/build.yml
vendored
107
.github/workflows/build.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user