Skip to content

Commit de6d1ce

Browse files
committed
🐛 update cli
1 parent 4573b57 commit de6d1ce

File tree

1 file changed

+23
-31
lines changed

1 file changed

+23
-31
lines changed

Diff for: .github/workflows/pake-cli.yaml

+23-31
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: Build App With Pake CLI
2-
32
on:
43
workflow_dispatch:
54
inputs:
65
platform:
76
description: 'Platform'
87
required: true
9-
default: 'ubuntu-22.04'
8+
default: 'macos-latest'
109
type: choice
1110
options:
1211
- 'windows-latest'
1312
- 'macos-latest'
14-
- 'ubuntu-22.04'
13+
- 'ubuntu-20.04'
1514
url:
1615
description: 'URL'
1716
required: true
@@ -65,17 +64,17 @@ jobs:
6564
- name: Checkout repository
6665
uses: actions/checkout@v3
6766

68-
- name: Install Node.js
67+
- name: Install node
6968
uses: actions/setup-node@v3
7069
with:
7170
node-version: 18
7271

73-
- name: Install Rust for ubuntu-22.04
74-
if: inputs.platform == 'ubuntu-22.04'
72+
- name: Install Rust for ubuntu-20.04
73+
if: inputs.platform == 'ubuntu-20.04'
7574
uses: dtolnay/rust-toolchain@stable
7675
with:
7776
toolchain: stable
78-
target: x86_64-unknown-linux-gnu
77+
target: x86_64-unknown-linux-musl
7978

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

94-
- name: Install dependencies (Ubuntu only)
95-
if: inputs.platform == 'ubuntu-22.04'
96-
run: |
97-
sudo apt-get update
98-
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
99-
100-
- name: Set PKG_CONFIG_PATH (Ubuntu only)
101-
if: inputs.platform == 'ubuntu-22.04'
102-
run: |
103-
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
104-
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
105-
106-
- name: Verify glib-2.0 installation (Ubuntu only)
107-
if: inputs.platform == 'ubuntu-22.04'
108-
run: |
109-
pkg-config --modversion glib-2.0
93+
- name: Install dependencies (ubuntu only)
94+
if: inputs.platform == 'ubuntu-20.04'
95+
uses: awalsh128/[email protected]
96+
with:
97+
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
98+
version: 1.1
11099

111-
- name: Install pake-cli locally
100+
- name: Install pake-cli local
112101
shell: bash
113102
run: |
114-
echo "Installing pake-cli locally"
103+
echo "install pake on local"
115104
npm install pake-cli
116105
117-
- name: Restore Rust cache
106+
- name: Rust cache restore
118107
uses: actions/cache/restore@v3
119-
id: cache_restore
108+
id: cache_store
120109
with:
121110
path: |
122111
~/.cargo/bin/
@@ -126,7 +115,7 @@ jobs:
126115
node_modules/pake-cli/src-tauri/target/
127116
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
128117

129-
- name: Install additional dependencies
118+
- name: Install dependencies
130119
run: |
131120
npm install shelljs
132121
npm install axios
@@ -144,17 +133,20 @@ jobs:
144133
FULLSCREEN: ${{ inputs.fullscreen }}
145134
MULTI_ARCH: ${{ inputs.multi_arch }}
146135
TARGETS: ${{ inputs.targets }}
136+
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
137+
PKG_CONFIG_ALLOW_SYSTEM_LIBS: 1
138+
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: 1
147139

148-
- name: Upload build artifacts
140+
- name: Upload archive
149141
uses: actions/upload-artifact@v4
150142
with:
151143
name: output-${{ inputs.platform }}.zip
152144
path: node_modules/pake-cli/output/*
153145
retention-days: 3
154146

155-
- name: Save Rust cache
147+
- name: Rust cache store
156148
uses: actions/cache/save@v3
157-
if: steps.cache_restore.outputs.cache-hit != 'true'
149+
if: steps.cache_store.outputs.cache-hit != 'true'
158150
with:
159151
path: |
160152
~/.cargo/bin/

0 commit comments

Comments
 (0)