🎨 Refactoring actions

This commit is contained in:
Tw93
2025-08-29 17:30:37 +08:00
parent ceeb2341e8
commit 1b94adc2a3
8 changed files with 224 additions and 186 deletions

View File

@@ -1,4 +1,9 @@
name: Build App With Pake CLI
env:
NODE_VERSION: '22'
PNPM_VERSION: '10.15.0'
on:
workflow_dispatch:
inputs:
@@ -64,50 +69,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js Environment
uses: ./.github/actions/setup-node.yml
with:
version: 10.15.0
run_install: false
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Install node
uses: actions/setup-node@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust.yml
with:
node-version: 22
cache: "pnpm"
platform: ${{ inputs.platform }}
- name: Install Rust for ubuntu-24.04
if: inputs.platform == 'ubuntu-24.04'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- name: Install Rust for windows-latest
if: inputs.platform == 'windows-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-x86_64-msvc
target: x86_64-pc-windows-msvc
- name: Install Rust for macos-latest
if: inputs.platform == 'macos-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-apple-darwin
- name: Add additional Rust target for multi-arch
if: inputs.platform == 'macos-latest' && inputs.multi_arch == true
run: |
rustup target add aarch64-apple-darwin
- name: Install dependencies (ubuntu only)
if: inputs.platform == 'ubuntu-24.04'
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: libsoup-3.0-dev libdbus-1-dev 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
version: 1.1
- name: Setup Ubuntu Dependencies
if: contains(inputs.platform, 'ubuntu')
uses: ./.github/actions/setup-ubuntu-deps.yml
- name: Cache Node dependencies
uses: actions/cache@v4