mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-18 06:17:21 +00:00
127 lines
3.8 KiB
YAML
127 lines
3.8 KiB
YAML
name: Build AeThex Launcher
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: 'macos-latest'
|
|
name: 'macOS'
|
|
- platform: 'ubuntu-22.04'
|
|
name: 'Linux'
|
|
- platform: 'windows-latest'
|
|
name: 'Windows'
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
name: Build for ${{ matrix.name }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
|
|
|
- name: Install Linux dependencies
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libwebkit2gtk-4.1-dev \
|
|
build-essential \
|
|
curl \
|
|
wget \
|
|
file \
|
|
libxdo-dev \
|
|
libssl-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm ci
|
|
|
|
- name: Build web application
|
|
run: npm run build
|
|
|
|
- name: Build Tauri app (macOS Universal)
|
|
if: matrix.platform == 'macos-latest'
|
|
run: npm run tauri:build -- --target universal-apple-darwin
|
|
env:
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
|
|
- name: Build Tauri app (Linux/Windows)
|
|
if: matrix.platform != 'macos-latest'
|
|
run: npm run tauri:build
|
|
env:
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
|
|
- name: Upload artifacts (Windows)
|
|
if: matrix.platform == 'windows-latest'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aethex-launcher-windows
|
|
path: |
|
|
src-tauri/target/release/bundle/msi/*.msi
|
|
src-tauri/target/release/bundle/nsis/*.exe
|
|
|
|
- name: Upload artifacts (macOS)
|
|
if: matrix.platform == 'macos-latest'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aethex-launcher-macos
|
|
path: |
|
|
src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
|
|
src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app
|
|
|
|
- name: Upload artifacts (Linux)
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aethex-launcher-linux
|
|
path: |
|
|
src-tauri/target/release/bundle/deb/*.deb
|
|
src-tauri/target/release/bundle/appimage/*.AppImage
|
|
src-tauri/target/release/bundle/rpm/*.rpm
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
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/**/*
|
|
draft: true
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|