forked from tw93/Pake
-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (137 loc) · 4.16 KB
/
pake-cli.yaml
File metadata and controls
150 lines (137 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Build App With Pake CLI
env:
NODE_VERSION: "22"
PNPM_VERSION: "10.15.0"
on:
workflow_dispatch:
inputs:
platform:
description: "Platform"
required: true
default: "macos-latest"
type: choice
options:
- "windows-latest"
- "macos-latest"
- "ubuntu-24.04"
url:
description: "URL"
required: true
name:
description: "Name, English, Linux no capital"
required: true
icon:
description: "Icon, Image URL, Optional"
required: false
width:
description: "Width, Optional"
required: false
default: "1200"
height:
description: "Height, Optional"
required: false
default: "780"
fullscreen:
description: "Fullscreen, At startup, Optional"
required: false
type: boolean
default: false
hide_title_bar:
description: "Hide TitleBar, MacOS only, Optional"
required: false
type: boolean
default: false
multi_arch:
description: "MultiArch, MacOS only, Optional"
required: false
type: boolean
default: false
targets:
description: "Targets, Linux only, Optional"
required: false
default: "deb"
type: choice
options:
- "deb"
- "appimage"
- "rpm"
jobs:
build:
name: ${{ inputs.platform }}
runs-on: ${{ inputs.platform }}
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-env
with:
mode: build
- name: Cache Node dependencies
uses: actions/cache@v4
with:
path: |
node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install pake-cli
shell: bash
run: |
echo "Installing latest pake-cli..."
pnpm install pake-cli@latest
# Verify installation
if [ ! -d "node_modules/pake-cli" ]; then
echo "Error: Failed to install pake-cli"
exit 1
fi
echo "Listing pake-cli contents:"
ls -la node_modules/pake-cli/ | head -5
echo "pake-cli installation verified"
- name: Rust cache restore
uses: actions/cache/restore@v4.2.0
id: cache_store
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
- name: Build with pake-cli
timeout-minutes: 15
run: |
node ./scripts/github-action-build.js
env:
URL: ${{ inputs.url }}
NAME: ${{ inputs.name }}
ICON: ${{ inputs.icon }}
HEIGHT: ${{ inputs.height }}
WIDTH: ${{ inputs.width }}
HIDE_TITLE_BAR: ${{ inputs.hide_title_bar }}
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 archive
uses: actions/upload-artifact@v4
with:
name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/*
retention-days: 3
- name: Rust cache store
uses: actions/cache/save@v4.2.0
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}