Compare commits
6 commits
fc43dffed1
...
e5f5255a41
| Author | SHA1 | Date | |
|---|---|---|---|
| e5f5255a41 | |||
| 75c1b2297d | |||
| a3b2f8b4d7 | |||
| 93d1df6582 | |||
| 89fc8a7146 | |||
| 750617a04a |
8 changed files with 97 additions and 3 deletions
89
.github/workflows/build.yml
vendored
Normal file
89
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
name: Build Dragon Wind Desktop
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# ── Windows .exe ─────────────────────────────────────────────────────────
|
||||||
|
build-windows:
|
||||||
|
name: Windows (.exe)
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js 20
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build Windows installer
|
||||||
|
run: npm run build:win
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
||||||
|
|
||||||
|
- name: Upload .exe artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dragon-wind-windows
|
||||||
|
path: dist/*.exe
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
# ── macOS .dmg ────────────────────────────────────────────────────────────
|
||||||
|
build-mac:
|
||||||
|
name: macOS (.dmg)
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js 20
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build macOS DMG
|
||||||
|
run: npm run build:mac
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
||||||
|
|
||||||
|
- name: Upload .dmg artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dragon-wind-mac
|
||||||
|
path: dist/*.dmg
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
# ── Release (on tag push only) ────────────────────────────────────────────
|
||||||
|
release:
|
||||||
|
name: Create Release
|
||||||
|
needs: [build-windows, build-mac]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: artifacts/**/*
|
||||||
|
generate_release_notes: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
BIN
assets/icon-256.png
Normal file
BIN
assets/icon-256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
assets/icon.icns
Normal file
BIN
assets/icon.icns
Normal file
Binary file not shown.
BIN
assets/icon.ico
Normal file
BIN
assets/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
BIN
assets/icon.png
Normal file
BIN
assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
BIN
assets/tray-icon.png
Normal file
BIN
assets/tray-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -19,9 +19,7 @@
|
||||||
"electron-builder": "^24.0.0"
|
"electron-builder": "^24.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.600.0",
|
"electron-store": "^8.2.0"
|
||||||
"@aws-sdk/s3-request-presigner": "^3.600.0",
|
|
||||||
"electron-store": "^10.0.0"
|
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "net.wilddragon.dragon-wind-desktop",
|
"appId": "net.wilddragon.dragon-wind-desktop",
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,14 @@ function updateTrayMenu(stats = null) {
|
||||||
|
|
||||||
// ── Main Window ───────────────────────────────────────────────────────────────
|
// ── Main Window ───────────────────────────────────────────────────────────────
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
|
const winIcon = process.platform === "win32"
|
||||||
|
? path.join(__dirname, "../../assets/icon.ico")
|
||||||
|
: process.platform === "darwin"
|
||||||
|
? path.join(__dirname, "../../assets/icon.icns")
|
||||||
|
: path.join(__dirname, "../../assets/icon.png");
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
|
icon: winIcon,
|
||||||
width: 480,
|
width: 480,
|
||||||
height: 680,
|
height: 680,
|
||||||
minWidth: 400,
|
minWidth: 400,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue