finalize workflow
Some checks failed
build / linux (push) Has been cancelled
build / windows (push) Has been cancelled

This commit is contained in:
schreifuchs 2025-03-03 13:29:40 +01:00
parent db6e9b162f
commit 16228eba7b
2 changed files with 31 additions and 25 deletions

View File

@ -1,32 +1,9 @@
name: build-linux
name: build
on:
push:
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: install apt dependencies
run: apt-get update && apt-get install -y nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: wails build -tags webkit2_41
- name: Archive bins
uses: actions/upload-artifact@v3
with:
name: linux-bins
path: build/bin
windows:
runs-on: ubuntu-latest
steps:
@ -50,3 +27,26 @@ jobs:
with:
name: windows-bins
path: build/bin
linux:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: install apt dependencies
run: apt-get update && apt-get install -y nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: wails build -tags webkit2_41
- name: Archive bins
uses: actions/upload-artifact@v3
with:
name: linux-bins
path: build/bin

View File

@ -2,6 +2,8 @@ package model
import (
"log"
"os"
"path"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
@ -20,7 +22,11 @@ type SubThing struct {
}
func InitDB() *gorm.DB {
db, err := gorm.Open(sqlite.Open("things.db"))
home, err := os.UserHomeDir()
if err != nil {
panic(err)
}
db, err := gorm.Open(sqlite.Open(path.Join(home, "things.db")))
if err != nil {
log.Panic(err)
}