mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
feat: add GitHub Actions workflow for building Linux application
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
name: Build Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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.0-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
|
||||
Reference in New Issue
Block a user