11name : Build App With Pake CLI
2+
23on :
34 workflow_dispatch :
45 inputs :
56 platform :
67 description : ' Platform'
78 required : true
8- default : ' macos-latest '
9+ default : ' ubuntu-22.04 '
910 type : choice
1011 options :
1112 - ' windows-latest'
1213 - ' macos-latest'
13- - ' ubuntu-20 .04'
14+ - ' ubuntu-22 .04'
1415 url :
1516 description : ' URL'
1617 required : true
@@ -64,13 +65,13 @@ jobs:
6465 - name : Checkout repository
6566 uses : actions/checkout@v3
6667
67- - name : Install node
68+ - name : Install Node.js
6869 uses : actions/setup-node@v3
6970 with :
7071 node-version : 18
7172
72- - name : Install Rust for ubuntu-20 .04
73- if : inputs.platform == 'ubuntu-20 .04'
73+ - name : Install Rust for ubuntu-22 .04
74+ if : inputs.platform == 'ubuntu-22 .04'
7475 uses : dtolnay/rust-toolchain@stable
7576 with :
7677 toolchain : stable
@@ -90,22 +91,32 @@ jobs:
9091 toolchain : stable
9192 target : x86_64-apple-darwin
9293
93- - name : Install dependencies (ubuntu only)
94- if : inputs.platform == 'ubuntu-20.04'
95- uses : awalsh128/cache-apt-pkgs-action@latest
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
98- version : 1.1
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
99110
100- - name : Install pake-cli local
111+ - name : Install pake-cli locally
101112 shell : bash
102113 run : |
103- echo "install pake on local "
114+ echo "Installing pake-cli locally "
104115 npm install pake-cli
105116
106- - name : Rust cache restore
117+ - name : Restore Rust cache
107118 uses : actions/cache/restore@v3
108- id : cache_store
119+ id : cache_restore
109120 with :
110121 path : |
111122 ~/.cargo/bin/
@@ -115,7 +126,7 @@ jobs:
115126 node_modules/pake-cli/src-tauri/target/
116127 key : ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
117128
118- - name : Install dependencies
129+ - name : Install additional dependencies
119130 run : |
120131 npm install shelljs
121132 npm install axios
@@ -134,16 +145,16 @@ jobs:
134145 MULTI_ARCH : ${{ inputs.multi_arch }}
135146 TARGETS : ${{ inputs.targets }}
136147
137- - name : Upload archive
148+ - name : Upload build artifacts
138149 uses : actions/upload-artifact@v4
139150 with :
140151 name : output-${{ inputs.platform }}.zip
141152 path : node_modules/pake-cli/output/*
142153 retention-days : 3
143154
144- - name : Rust cache store
155+ - name : Save Rust cache
145156 uses : actions/cache/save@v3
146- if : steps.cache_store .outputs.cache-hit != 'true'
157+ if : steps.cache_restore .outputs.cache-hit != 'true'
147158 with :
148159 path : |
149160 ~/.cargo/bin/
0 commit comments