mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: Build Linux
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.24"
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
pkg-config \
|
|
libgtk-3-dev \
|
|
libwebkit2gtk-4.1-dev \
|
|
libasound2-dev \
|
|
libayatana-appindicator3-dev
|
|
|
|
- name: Install Wails CLI
|
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm install
|
|
working-directory: frontend
|
|
|
|
- name: Determine version
|
|
id: version
|
|
run: |
|
|
if [ -f scripts/VERSION ]; then
|
|
VERSION=$(head -n1 scripts/VERSION | tr -d '\r\n' | xargs)
|
|
fi
|
|
if [ -z "$VERSION" ]; then
|
|
VERSION="dev"
|
|
fi
|
|
echo "app_version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Fix npm bin permissions
|
|
run: chmod +x frontend/node_modules/.bin/* 2>/dev/null || true
|
|
|
|
- name: Build app
|
|
run: |
|
|
WAILS_WEBKIT_TAGS=""
|
|
if pkg-config --exists webkit2gtk-4.1 2>/dev/null; then
|
|
WAILS_WEBKIT_TAGS="-tags webkit2_41"
|
|
fi
|
|
wails build -platform linux/amd64 -clean $WAILS_WEBKIT_TAGS -ldflags "-X main.AppVersion=${{ steps.version.outputs.app_version }}"
|
|
|
|
- name: Upload binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wis-free-v3-linux-amd64
|
|
path: build/bin/wis-free-v3 |