Skip to content

🔧 build: 去除无关文件 #102

🔧 build: 去除无关文件

🔧 build: 去除无关文件 #102

Workflow file for this run

# Dev 分支推送部署预览
## 仅部署 Win 端
name: Build Dev
on:
push:
branches:
- dev
jobs:
release:
name: Build and electron app
runs-on: windows-latest
steps:
# 检出 Git 仓库
- name: Check out git repository
uses: actions/[email protected]
# 安装 Node.js
- name: Install Node.js
uses: actions/[email protected]
with:
node-version: "18.x"
# 复制环境变量文件
- name: Copy .env.example
run: |
if (-not (Test-Path .env)) {
Copy-Item .env.example .env
} else {
Write-Host ".env file already exists. Skipping the copy step."
}
# 安装项目依赖
- name: Install Dependencies
run: npm install
# 构建 Electron App
- name: Build Electron App
run: npm run build:win
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 清理不必要的构建产物
- name: Cleanup Artifacts
run: |
npx rimraf "dist/!(*.exe)"
# 上传构建产物
- name: Upload artifacts
uses: actions/[email protected]
with:
name: SPlayer-dev
path: dist