💄 format
This commit is contained in:
78
action.yml
78
action.yml
@@ -1,101 +1,101 @@
|
||||
name: 'Pake Web App Builder'
|
||||
description: 'Transform any webpage into a lightweight desktop app using Rust and Tauri'
|
||||
author: 'tw93'
|
||||
name: "Pake Web App Builder"
|
||||
description: "Transform any webpage into a lightweight desktop app using Rust and Tauri"
|
||||
author: "tw93"
|
||||
branding:
|
||||
icon: 'package'
|
||||
color: 'blue'
|
||||
icon: "package"
|
||||
color: "blue"
|
||||
|
||||
inputs:
|
||||
url:
|
||||
description: 'Target URL to package'
|
||||
description: "Target URL to package"
|
||||
required: true
|
||||
|
||||
|
||||
name:
|
||||
description: 'Application name'
|
||||
description: "Application name"
|
||||
required: true
|
||||
|
||||
|
||||
output-dir:
|
||||
description: 'Output directory for packages'
|
||||
description: "Output directory for packages"
|
||||
required: false
|
||||
default: 'dist'
|
||||
|
||||
default: "dist"
|
||||
|
||||
icon:
|
||||
description: 'Custom app icon URL or path'
|
||||
description: "Custom app icon URL or path"
|
||||
required: false
|
||||
|
||||
|
||||
width:
|
||||
description: 'Window width'
|
||||
description: "Window width"
|
||||
required: false
|
||||
default: '1200'
|
||||
|
||||
default: "1200"
|
||||
|
||||
height:
|
||||
description: 'Window height'
|
||||
description: "Window height"
|
||||
required: false
|
||||
default: '780'
|
||||
|
||||
default: "780"
|
||||
|
||||
debug:
|
||||
description: 'Enable debug mode'
|
||||
description: "Enable debug mode"
|
||||
required: false
|
||||
default: 'false'
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
package-path:
|
||||
description: 'Path to the generated package'
|
||||
|
||||
description: "Path to the generated package"
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
shell: bash
|
||||
run: |
|
||||
# Install Node.js dependencies
|
||||
npm install
|
||||
|
||||
|
||||
# Build Pake CLI if not exists
|
||||
if [ ! -f "dist/cli.js" ]; then
|
||||
npm run cli:build
|
||||
fi
|
||||
|
||||
|
||||
# Ensure node is accessible in subsequent steps
|
||||
echo "$(npm bin)" >> $GITHUB_PATH
|
||||
|
||||
|
||||
# Install Rust/Cargo if needed
|
||||
if ! command -v cargo &> /dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source ~/.cargo/env
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
|
||||
- name: Build Pake App
|
||||
|
||||
- name: Build Pake App
|
||||
shell: bash
|
||||
run: |
|
||||
# Build arguments
|
||||
ARGS=("${{ inputs.url }}")
|
||||
|
||||
|
||||
ARGS+=("--name" "${{ inputs.name }}")
|
||||
|
||||
|
||||
if [ -n "${{ inputs.icon }}" ]; then
|
||||
ARGS+=("--icon" "${{ inputs.icon }}")
|
||||
fi
|
||||
|
||||
|
||||
ARGS+=("--width" "${{ inputs.width }}")
|
||||
ARGS+=("--height" "${{ inputs.height }}")
|
||||
|
||||
|
||||
if [ "${{ inputs.debug }}" == "true" ]; then
|
||||
ARGS+=("--debug")
|
||||
fi
|
||||
|
||||
|
||||
# Create output directory
|
||||
mkdir -p "${{ inputs.output-dir }}"
|
||||
export PAKE_CREATE_APP=1
|
||||
|
||||
|
||||
# Run Pake CLI
|
||||
echo "🔧 Running: node dist/cli.js ${ARGS[*]}"
|
||||
node dist/cli.js "${ARGS[@]}"
|
||||
|
||||
|
||||
# Find generated package and set output
|
||||
PACKAGE=$(find src-tauri/target -type f \( -name "*.deb" -o -name "*.exe" -o -name "*.msi" -o -name "*.dmg" \) 2>/dev/null | head -1)
|
||||
|
||||
|
||||
# If no file packages found, look for .app directory (macOS)
|
||||
if [ -z "$PACKAGE" ]; then
|
||||
PACKAGE=$(find src-tauri/target -type d -name "*.app" 2>/dev/null | head -1)
|
||||
@@ -109,4 +109,4 @@ runs:
|
||||
else
|
||||
echo "❌ No package found"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user