75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: Desktop App
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- 'desktop-*'
|
|
- 'v[0-9]+.[0-9]+.[0-9]*'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Linux (amd64)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- run: npm ci
|
|
working-directory: web
|
|
|
|
- run: npm run build
|
|
working-directory: web
|
|
|
|
- run: |
|
|
rm -rf cmd/desktop/frontend/dist
|
|
mkdir -p cmd/desktop/frontend/dist
|
|
cp -r web/dist/* cmd/desktop/frontend/dist/
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
|
|
- run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
|
|
- run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest
|
|
|
|
- run: wails3 build -clean
|
|
working-directory: cmd/desktop
|
|
env:
|
|
CGO_ENABLED: 1
|
|
|
|
- run: |
|
|
cd cmd/desktop/build/bin
|
|
tar czf oikos-desktop-linux-amd64.tar.gz oikos-desktop
|
|
sha256sum oikos-desktop-linux-amd64.tar.gz > oikos-desktop-linux-amd64.tar.gz.sha256
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: oikos-desktop-linux-amd64
|
|
path: |
|
|
cmd/desktop/build/bin/oikos-desktop-linux-amd64.tar.gz
|
|
cmd/desktop/build/bin/oikos-desktop-linux-amd64.tar.gz.sha256
|
|
|
|
release:
|
|
name: Attach to Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: oikos-desktop-linux-amd64
|
|
|
|
- uses: https://gitea.com/actions/release-action@v1
|
|
with:
|
|
files: |
|
|
oikos-desktop-linux-amd64.tar.gz
|
|
oikos-desktop-linux-amd64.tar.gz.sha256
|
|
api_key: ${{ secrets.GITEA_TOKEN }}
|