🐛 update cli yaml
This commit is contained in:
49
.github/workflows/pake-cli.yaml
vendored
49
.github/workflows/pake-cli.yaml
vendored
@@ -1,16 +1,17 @@
|
|||||||
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: 'macos-latest'
|
default: 'ubuntu-22.04'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- 'windows-latest'
|
- 'windows-latest'
|
||||||
- 'macos-latest'
|
- 'macos-latest'
|
||||||
- 'ubuntu-20.04'
|
- 'ubuntu-22.04'
|
||||||
url:
|
url:
|
||||||
description: 'URL'
|
description: 'URL'
|
||||||
required: true
|
required: true
|
||||||
@@ -64,13 +65,13 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install node
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
|
|
||||||
- name: Install Rust for ubuntu-20.04
|
- name: Install Rust for ubuntu-22.04
|
||||||
if: inputs.platform == 'ubuntu-20.04'
|
if: inputs.platform == 'ubuntu-22.04'
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
@@ -90,22 +91,32 @@ 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-20.04'
|
if: inputs.platform == 'ubuntu-22.04'
|
||||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
run: |
|
||||||
with:
|
sudo apt-get update
|
||||||
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
|
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
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
- name: Install pake-cli local
|
- 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 locally
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "install pake on local"
|
echo "Installing pake-cli locally"
|
||||||
npm install pake-cli
|
npm install pake-cli
|
||||||
|
|
||||||
- name: Rust cache restore
|
- name: Restore Rust cache
|
||||||
uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v3
|
||||||
id: cache_store
|
id: cache_restore
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -115,7 +126,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 dependencies
|
- name: Install additional dependencies
|
||||||
run: |
|
run: |
|
||||||
npm install shelljs
|
npm install shelljs
|
||||||
npm install axios
|
npm install axios
|
||||||
@@ -134,16 +145,16 @@ jobs:
|
|||||||
MULTI_ARCH: ${{ inputs.multi_arch }}
|
MULTI_ARCH: ${{ inputs.multi_arch }}
|
||||||
TARGETS: ${{ inputs.targets }}
|
TARGETS: ${{ inputs.targets }}
|
||||||
|
|
||||||
- name: Upload archive
|
- name: Upload build artifacts
|
||||||
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: Rust cache store
|
- name: Save Rust cache
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v3
|
||||||
if: steps.cache_store.outputs.cache-hit != 'true'
|
if: steps.cache_restore.outputs.cache-hit != 'true'
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
|
|||||||
Reference in New Issue
Block a user