diff --git a/.github/workflows/pake-cli.yaml b/.github/workflows/pake-cli.yaml index 6b6f2f5..495e90c 100644 --- a/.github/workflows/pake-cli.yaml +++ b/.github/workflows/pake-cli.yaml @@ -1,16 +1,17 @@ name: Build App With Pake CLI + on: workflow_dispatch: inputs: platform: description: 'Platform' required: true - default: 'macos-latest' + default: 'ubuntu-22.04' type: choice options: - 'windows-latest' - 'macos-latest' - - 'ubuntu-20.04' + - 'ubuntu-22.04' url: description: 'URL' required: true @@ -64,13 +65,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install node + - name: Install Node.js uses: actions/setup-node@v3 with: node-version: 18 - - name: Install Rust for ubuntu-20.04 - if: inputs.platform == 'ubuntu-20.04' + - name: Install Rust for ubuntu-22.04 + if: inputs.platform == 'ubuntu-22.04' uses: dtolnay/rust-toolchain@stable with: toolchain: stable @@ -90,22 +91,32 @@ jobs: toolchain: stable target: x86_64-apple-darwin - - name: Install dependencies (ubuntu only) - if: inputs.platform == 'ubuntu-20.04' - uses: awalsh128/cache-apt-pkgs-action@latest - with: - 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 - version: 1.1 + - name: Install dependencies (Ubuntu only) + if: inputs.platform == 'ubuntu-22.04' + run: | + sudo apt-get update + 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 - - 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 run: | - echo "install pake on local" + echo "Installing pake-cli locally" npm install pake-cli - - name: Rust cache restore + - name: Restore Rust cache uses: actions/cache/restore@v3 - id: cache_store + id: cache_restore with: path: | ~/.cargo/bin/ @@ -115,7 +126,7 @@ jobs: node_modules/pake-cli/src-tauri/target/ key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }} - - name: Install dependencies + - name: Install additional dependencies run: | npm install shelljs npm install axios @@ -134,16 +145,16 @@ jobs: MULTI_ARCH: ${{ inputs.multi_arch }} TARGETS: ${{ inputs.targets }} - - name: Upload archive + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: output-${{ inputs.platform }}.zip path: node_modules/pake-cli/output/* retention-days: 3 - - name: Rust cache store + - name: Save Rust cache uses: actions/cache/save@v3 - if: steps.cache_store.outputs.cache-hit != 'true' + if: steps.cache_restore.outputs.cache-hit != 'true' with: path: | ~/.cargo/bin/