Skip to content

Update desktop.yml

Update desktop.yml #4

Workflow file for this run

name: Build Desktop for pmOS (Linux ARM64)
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# 1. 忽略无关平台的 Native 警告并执行全量桌面打包
- name: Build Desktop Distributable
run: |
./gradlew packageDistributionForCurrentOS createDistributable -Pkotlin.native.ignoreDisabledTargets=true --continue || ./gradlew assemble -Pkotlin.native.ignoreDisabledTargets=true
# 2. 自动定位打包生成的 app 绿色目录并压缩
- name: Package Tarball
run: |
DIST_DIR=$(find . -type d -path "*/build/compose/binaries/main/app" 2>/dev/null | head -n 1)
if [ -z "$DIST_DIR" ]; then
echo "Searching for any built binary folder..."
DIST_DIR=$(find . -type d -name "app" | grep "binaries" | head -n 1)
fi
echo "Found distributable at: $DIST_DIR"
cd "$DIST_DIR"
tar -czvf ${{ github.workspace }}/CodeAssist-Linux-arm64.tar.gz *
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CodeAssist-Linux-arm64
path: CodeAssist-Linux-arm64.tar.gz