Skip to content

Commit

Permalink
🐛 update cli
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Mar 1, 2025
1 parent 4573b57 commit de6d1ce
Showing 1 changed file with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions .github/workflows/pake-cli.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Build App With Pake CLI

on:
workflow_dispatch:
inputs:
platform:
description: 'Platform'
required: true
default: 'ubuntu-22.04'
default: 'macos-latest'
type: choice
options:
- 'windows-latest'
- 'macos-latest'
- 'ubuntu-22.04'
- 'ubuntu-20.04'
url:
description: 'URL'
required: true
Expand Down Expand Up @@ -65,17 +64,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node.js
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Rust for ubuntu-22.04
if: inputs.platform == 'ubuntu-22.04'
- name: Install Rust for ubuntu-20.04
if: inputs.platform == 'ubuntu-20.04'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-musl

- name: Install Rust for windows-latest
if: inputs.platform == 'windows-latest'
Expand All @@ -91,32 +90,22 @@ jobs:
toolchain: stable
target: x86_64-apple-darwin

- name: Install dependencies (Ubuntu only)
if: inputs.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
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
- name: Set PKG_CONFIG_PATH (Ubuntu only)
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 dependencies (ubuntu only)
if: inputs.platform == 'ubuntu-20.04'
uses: awalsh128/[email protected]
with:
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: Install pake-cli locally
- name: Install pake-cli local
shell: bash
run: |
echo "Installing pake-cli locally"
echo "install pake on local"
npm install pake-cli
- name: Restore Rust cache
- name: Rust cache restore
uses: actions/cache/restore@v3
id: cache_restore
id: cache_store
with:
path: |
~/.cargo/bin/
Expand All @@ -126,7 +115,7 @@ jobs:
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}

- name: Install additional dependencies
- name: Install dependencies
run: |
npm install shelljs
npm install axios
Expand All @@ -144,17 +133,20 @@ jobs:
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 build artifacts
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/*
retention-days: 3

- name: Save Rust cache
- name: Rust cache store
uses: actions/cache/save@v3
if: steps.cache_restore.outputs.cache-hit != 'true'
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
Expand Down

0 comments on commit de6d1ce

Please sign in to comment.