Create desktop-build.yml

This commit is contained in:
MrPiglr 2025-12-05 17:03:27 -07:00 committed by GitHub
parent ab2d6a6588
commit e87525aa1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

122
.github/workflows/desktop-build.yml vendored Normal file
View file

@ -0,0 +1,122 @@
name: Build Desktop App
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v1.0.0)'
required: false
default: 'dev'
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-Windows
path: dist/*.exe
if-no-files-found: error
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-macOS
path: dist/*.dmg
if-no-files-found: error
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-Linux
path: |
dist/*.AppImage
dist/*.deb
if-no-files-found: warn
create-release:
needs: [build-windows, build-macos, build-linux]
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 Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/AeThex-Windows/*.exe
artifacts/AeThex-macOS/*.dmg
artifacts/AeThex-Linux/*.AppImage
artifacts/AeThex-Linux/*.deb
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}