🐛 update cli

This commit is contained in:
Tw93
2025-03-01 22:11:11 +08:00
parent 4573b57253
commit de6d1ceb0f

View File

@@ -1,17 +1,16 @@
name: Build App With Pake CLI name: Build App With Pake CLI
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
platform: platform:
description: 'Platform' description: 'Platform'
required: true required: true
default: 'ubuntu-22.04' default: 'macos-latest'
type: choice type: choice
options: options:
- 'windows-latest' - 'windows-latest'
- 'macos-latest' - 'macos-latest'
- 'ubuntu-22.04' - 'ubuntu-20.04'
url: url:
description: 'URL' description: 'URL'
required: true required: true
@@ -65,17 +64,17 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Node.js - name: Install node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
- name: Install Rust for ubuntu-22.04 - name: Install Rust for ubuntu-20.04
if: inputs.platform == 'ubuntu-22.04' if: inputs.platform == 'ubuntu-20.04'
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable toolchain: stable
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-musl
- name: Install Rust for windows-latest - name: Install Rust for windows-latest
if: inputs.platform == 'windows-latest' if: inputs.platform == 'windows-latest'
@@ -91,32 +90,22 @@ jobs:
toolchain: stable toolchain: stable
target: x86_64-apple-darwin target: x86_64-apple-darwin
- name: Install dependencies (Ubuntu only) - name: Install dependencies (ubuntu only)
if: inputs.platform == 'ubuntu-22.04' if: inputs.platform == 'ubuntu-20.04'
run: | uses: awalsh128/cache-apt-pkgs-action@v1.4.3
sudo apt-get update with:
sudo apt-get install -y libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2.2-dev libglib2.0-dev packages: libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra libglib2.0-dev libgobject-2.0-0 pkg-config
version: 1.1
- name: Set PKG_CONFIG_PATH (Ubuntu only) - name: Install pake-cli local
if: inputs.platform == 'ubuntu-22.04'
run: |
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Verify glib-2.0 installation (Ubuntu only)
if: inputs.platform == 'ubuntu-22.04'
run: |
pkg-config --modversion glib-2.0
- name: Install pake-cli locally
shell: bash shell: bash
run: | run: |
echo "Installing pake-cli locally" echo "install pake on local"
npm install pake-cli npm install pake-cli
- name: Restore Rust cache - name: Rust cache restore
uses: actions/cache/restore@v3 uses: actions/cache/restore@v3
id: cache_restore id: cache_store
with: with:
path: | path: |
~/.cargo/bin/ ~/.cargo/bin/
@@ -126,7 +115,7 @@ jobs:
node_modules/pake-cli/src-tauri/target/ node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }} key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
- name: Install additional dependencies - name: Install dependencies
run: | run: |
npm install shelljs npm install shelljs
npm install axios npm install axios
@@ -144,17 +133,20 @@ jobs:
FULLSCREEN: ${{ inputs.fullscreen }} FULLSCREEN: ${{ inputs.fullscreen }}
MULTI_ARCH: ${{ inputs.multi_arch }} MULTI_ARCH: ${{ inputs.multi_arch }}
TARGETS: ${{ inputs.targets }} 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 build artifacts - name: Upload archive
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: output-${{ inputs.platform }}.zip name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/* path: node_modules/pake-cli/output/*
retention-days: 3 retention-days: 3
- name: Save Rust cache - name: Rust cache store
uses: actions/cache/save@v3 uses: actions/cache/save@v3
if: steps.cache_restore.outputs.cache-hit != 'true' if: steps.cache_store.outputs.cache-hit != 'true'
with: with:
path: | path: |
~/.cargo/bin/ ~/.cargo/bin/