mirror of
https://github.com/kunkunsh/kunkun-ext-neohtop.git
synced 2025-04-11 17:29:45 +00:00
92 lines
2.8 KiB
YAML
92 lines
2.8 KiB
YAML
name: Linux (x86_64, aarch64) Nightly Build
|
|
|
|
on:
|
|
workflow_dispatch: # Allows manual triggering
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Linux Packages
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
cache: 'npm'
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Add Target
|
|
run: rustup target add ${{ matrix.target }}
|
|
|
|
- name: Install Cross-Compilation Tools
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
|
|
|
- name: Install Linux Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
pkg-config \
|
|
libgtk-3-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
libglib2.0-dev \
|
|
libjavascriptcoregtk-4.0-dev \
|
|
libsoup-3.0-dev \
|
|
libwebkit2gtk-4.1-dev
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
npm install
|
|
|
|
- name: Build Frontend
|
|
run: npm run build
|
|
|
|
- name: Build AppImage (${{ matrix.target }})
|
|
run: |
|
|
echo "Building AppImage for ${{ matrix.target }}..."
|
|
npm run tauri build -- --target ${{ matrix.target }} --bundles appimage
|
|
|
|
- name: Build Debian Package (${{ matrix.target }})
|
|
run: |
|
|
echo "Building Debian package for ${{ matrix.target }}..."
|
|
npm run tauri build -- --target ${{ matrix.target }} --bundles deb
|
|
|
|
- name: Upload AppImage
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-appimage-${{ matrix.target }}
|
|
path: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage
|
|
|
|
- name: Upload Debian Package
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-deb-${{ matrix.target }}
|
|
path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
|
|
|
- name: Create Release
|
|
if: github.event_name == 'schedule'
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: Linux Nightly Build ${{ github.sha }}
|
|
tag_name: linux-nightly-${{ github.sha }}
|
|
files: |
|
|
src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage
|
|
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
|
prerelease: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |