Files
desktop/.github/workflows/release.yml
Ivan Li ca8d4a3d36 feat: upgrade to version 2.0.0-alpha with mainstream dependencies
- Update application version to 2.0.0-alpha
- Update application name to 'Ambient Light Control'
- Upgrade Node.js requirement to >=22.0.0 (current LTS)
- Upgrade pnpm requirement to >=10.0.0 (current stable)
- Update all GitHub Actions workflows to use Node.js 22 and pnpm 10
- Update README.md with current version requirements
- Add comprehensive project metadata to package.json
- Remove obsolete src-tauri/src-tauri directory structure
- Update Cargo.toml with proper project information
2025-07-09 20:05:38 +08:00

141 lines
4.0 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: true
type: string
prerelease:
description: 'Mark as pre-release'
required: false
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create_release.outputs.id }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: false
prerelease: ${{ github.event.inputs.prerelease }}
body: |
## Changes in this Release
- Auto-generated release for version ${{ github.event.inputs.version }}
## Downloads
Choose the appropriate installer for your operating system:
### macOS
- **DMG**: Universal binary for Intel and Apple Silicon Macs
### Windows
- **MSI**: Windows Installer package
- **EXE**: NSIS installer
### Linux
- **DEB**: Debian/Ubuntu package
- **AppImage**: Portable application
## Installation Notes
### macOS
1. Download the DMG file
2. Open the DMG and drag the app to Applications folder
3. On first launch, you may need to right-click and select "Open" due to Gatekeeper
### Windows
1. Download the MSI or EXE installer
2. Run the installer as administrator
3. Follow the installation wizard
### Linux
1. **DEB**: `sudo dpkg -i ambient-light-desktop_*.deb`
2. **AppImage**: Make executable and run directly
## System Requirements
- **macOS**: 13.0 or later
- **Windows**: Windows 10 or later
- **Linux**: Ubuntu 22.04 or equivalent
build-and-upload:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
target: 'universal-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
target: 'x86_64-unknown-linux-gnu'
- platform: 'windows-latest'
args: ''
target: 'x86_64-pc-windows-msvc'
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install frontend dependencies
run: pnpm install
- name: Build and release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
args: ${{ matrix.args }}