这是indexloc提供的服务,不要输入任何密码
Skip to content

Build App With Pake CLI #1

Build App With Pake CLI

Build App With Pake CLI #1

Workflow file for this run

name: Build App With Pake CLI
env:
NODE_VERSION: "22"
PNPM_VERSION: "10.15.0"
on:
workflow_dispatch:
inputs:
platform:
description: "Platform"
required: true
default: "macos-latest"
type: choice
options:
- "windows-latest"
- "macos-latest"
- "ubuntu-24.04"
url:
description: "URL"
required: true
name:
description: "Name, English, Linux no capital"
required: true
icon:
description: "Icon, Image URL, Optional"
required: false
width:
description: "Width, Optional"
required: false
default: "1200"
height:
description: "Height, Optional"
required: false
default: "780"
fullscreen:
description: "Fullscreen, At startup, Optional"
required: false
type: boolean
default: false
hide_title_bar:
description: "Hide TitleBar, MacOS only, Optional"
required: false
type: boolean
default: false
multi_arch:
description: "MultiArch, MacOS only, Optional"
required: false
type: boolean
default: false
targets:
description: "Targets, Linux only, Optional"
required: false
default: "deb"
type: choice
options:
- "deb"
- "appimage"
- "rpm"
jobs:
build:
name: ${{ inputs.platform }}
runs-on: ${{ inputs.platform }}
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-env
with:
mode: build
- name: Cache Node dependencies
uses: actions/cache@v4
with:
path: |
node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install pake-cli
shell: bash
run: |
echo "Installing latest pake-cli..."
pnpm install pake-cli@latest
# Verify installation
if [ ! -d "node_modules/pake-cli" ]; then
echo "Error: Failed to install pake-cli"
exit 1
fi
echo "Listing pake-cli contents:"
ls -la node_modules/pake-cli/ | head -5
echo "pake-cli installation verified"
- name: Rust cache restore
uses: actions/cache/restore@v4.2.0
id: cache_store
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
- name: Build with pake-cli
timeout-minutes: 15
run: |
node ./scripts/github-action-build.js
env:
URL: ${{ inputs.url }}
NAME: ${{ inputs.name }}
ICON: ${{ inputs.icon }}
HEIGHT: ${{ inputs.height }}
WIDTH: ${{ inputs.width }}
HIDE_TITLE_BAR: ${{ inputs.hide_title_bar }}
FULLSCREEN: ${{ inputs.fullscreen }}
MULTI_ARCH: ${{ inputs.multi_arch }}
TARGETS: ${{ inputs.targets }}
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
PKG_CONFIG_ALLOW_SYSTEM_LIBS: 1
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: 1
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/*
retention-days: 3
- name: Rust cache store
uses: actions/cache/save@v4.2.0
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}