Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
:lipstick: format
Tw93ae2c5e0a1748
diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.ymlindex 74193a02..4e80e105 100644--- a/.github/workflows/test-action.yml+++ b/.github/workflows/test-action.yml@@ -1,16 +1,16 @@-name: 'Test Pake Action'+name: "Test Pake Action"on:workflow_dispatch:inputs:url:- description: 'URL to package'+ description: "URL to package"required: true- default: 'https://weekly.tw93.fun'+ default: "https://weekly.tw93.fun"name:- description: 'App name'+ description: "App name"required: true- default: 'TestApp'+ default: "TestApp"jobs:test:@@ -22,7 +22,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@v4with:- node-version: '20'+ node-version: "20"- name: Build Pake Appid: builddiff --git a/README_ACTION.md b/README_ACTION.mdindex 14536f16..e3eaaa30 100644--- a/README_ACTION.md+++ b/README_ACTION.md@@ -8,26 +8,26 @@ Transform any webpage into a lightweight desktop app with a single GitHub Action- name: Build Pake Appuses: tw93/Pake@v3with:- url: 'https://example.com'- name: 'MyApp'+ url: "https://example.com"+ name: "MyApp"```## Inputs-| Parameter | Description | Required | Default |-|-----------|-------------|----------|---------|-| `url` | Target URL to package | ✅ | |-| `name` | Application name | ✅ | |-| `output-dir` | Output directory | | `dist` |-| `icon` | Custom app icon URL/path | | |-| `width` | Window width | | `1200` |-| `height` | Window height | | `780` |-| `debug` | Enable debug mode | | `false` |+| Parameter | Description | Required | Default |+| ------------ | ------------------------ | -------- | ------- |+| `url` | Target URL to package | ✅ | |+| `name` | Application name | ✅ | |+| `output-dir` | Output directory | | `dist` |+| `icon` | Custom app icon URL/path | | |+| `width` | Window width | | `1200` |+| `height` | Window height | | `780` |+| `debug` | Enable debug mode | | `false` |## Outputs-| Output | Description |-|--------|-------------|+| Output | Description |+| -------------- | ----------------------------- || `package-path` | Path to the generated package |## Examples@@ -45,8 +45,8 @@ jobs:- uses: actions/checkout@v4- uses: tw93/Pake@v3with:- url: 'https://weekly.tw93.fun'- name: 'WeeklyApp'+ url: "https://weekly.tw93.fun"+ name: "WeeklyApp"```### With Custom Icon@@ -54,9 +54,9 @@ jobs:```yaml- uses: tw93/Pake@v3with:- url: 'https://example.com'- name: 'MyApp'- icon: 'https://example.com/icon.png'+ url: "https://example.com"+ name: "MyApp"+ icon: "https://example.com/icon.png"width: 1400height: 900```@@ -74,20 +74,20 @@ jobs:- uses: actions/checkout@v4- uses: tw93/Pake@v3with:- url: 'https://example.com'- name: 'CrossPlatformApp'+ url: "https://example.com"+ name: "CrossPlatformApp"```## How It Works1. **Auto Setup**: Installs Rust, Node.js dependencies, builds Pake CLI-2. **Build App**: Runs `pake` command with your parameters+2. **Build App**: Runs `pake` command with your parameters3. **Package Output**: Finds and moves the generated package to output directory## Supported Platforms- **Linux**: `.deb` packages (Ubuntu runners)-- **macOS**: `.app` and `.dmg` packages (macOS runners)+- **macOS**: `.app` and `.dmg` packages (macOS runners)- **Windows**: `.exe` and `.msi` packages (Windows runners)Use GitHub's matrix strategy to build for multiple platforms simultaneously.diff --git a/action.yml b/action.ymlindex f7d8ae18..419adcbb 100644--- a/action.yml+++ b/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 Environmentshell: bashrun: |# Install Node.js dependenciesnpm install-+# Build Pake CLI if not existsif [ ! -f "dist/cli.js" ]; thennpm run cli:buildfi-+# Ensure node is accessible in subsequent stepsecho "$(npm bin)" >> $GITHUB_PATH-+# Install Rust/Cargo if neededif ! command -v cargo &> /dev/null; thencurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -ysource ~/.cargo/envecho "$HOME/.cargo/bin" >> $GITHUB_PATHfi-- - name: Build Pake App++ - name: Build Pake Appshell: bashrun: |# Build argumentsARGS=("${{ inputs.url }}")-+ARGS+=("--name" "${{ inputs.name }}")-+if [ -n "${{ inputs.icon }}" ]; thenARGS+=("--icon" "${{ inputs.icon }}")fi-+ARGS+=("--width" "${{ inputs.width }}")ARGS+=("--height" "${{ inputs.height }}")-+if [ "${{ inputs.debug }}" == "true" ]; thenARGS+=("--debug")fi-+# Create output directorymkdir -p "${{ inputs.output-dir }}"export PAKE_CREATE_APP=1-+# Run Pake CLIecho "🔧 Running: node dist/cli.js ${ARGS[*]}"node dist/cli.js "${ARGS[@]}"-+# Find generated package and set outputPACKAGE=$(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" ]; thenPACKAGE=$(find src-tauri/target -type d -name "*.app" 2>/dev/null | head -1)@@ -109,4 +109,4 @@ runs:elseecho "❌ No package found"exit 1- fi\ No newline at end of file+ fidiff --git a/bin/cli.ts b/bin/cli.tsindex 25cd1d24..a79de43d 100644--- a/bin/cli.ts+++ b/bin/cli.ts@@ -151,7 +151,7 @@ programif (!url) {program.help({- error: false+ error: false,});return;}diff --git a/bin/helpers/merge.ts b/bin/helpers/merge.tsindex 5201a56d..6456d84a 100644--- a/bin/helpers/merge.ts+++ b/bin/helpers/merge.ts@@ -319,8 +319,8 @@ StartupNotify=truetauriConf.app.security = {headers: {'Cross-Origin-Opener-Policy': 'same-origin',- 'Cross-Origin-Embedder-Policy': 'require-corp'- }+ 'Cross-Origin-Embedder-Policy': 'require-corp',+ },};}