Skip to content

Commit

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

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

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

- name: Install Rust for ubuntu-20.04
if: inputs.platform == 'ubuntu-20.04'
- name: Install Rust for ubuntu-22.04
if: inputs.platform == 'ubuntu-22.04'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
Expand All @@ -90,22 +91,32 @@ jobs:
toolchain: stable
target: x86_64-apple-darwin

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

- name: Install dependencies
- name: Install additional dependencies
run: |
npm install shelljs
npm install axios
Expand All @@ -134,16 +145,16 @@ jobs:
MULTI_ARCH: ${{ inputs.multi_arch }}
TARGETS: ${{ inputs.targets }}

- name: Upload archive
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/*
retention-days: 3

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

0 comments on commit 4573b57

Please sign in to comment.