Compare commits

...

10 Commits

Author SHA1 Message Date
ce29b8647b updated readme
Some checks failed
build / windows (push) Successful in 2m20s
build / linux (push) Has been cancelled
2025-03-03 13:50:03 +01:00
16228eba7b finalize workflow
Some checks failed
build / linux (push) Has been cancelled
build / windows (push) Has been cancelled
2025-03-03 13:29:40 +01:00
db6e9b162f add windows pipeline
All checks were successful
build-linux / linux (push) Successful in 1m56s
build-linux / windows (push) Successful in 4m47s
2025-03-03 13:05:34 +01:00
03bffbda7e use upload-artifact v3 to pls pls pls work now
All checks were successful
build-linux / publish (push) Successful in 5m53s
2025-03-03 12:06:31 +01:00
778a2983ed does it work now pls
Some checks failed
build-linux / publish (push) Failing after 5m30s
2025-03-03 11:58:33 +01:00
9e6b8f05a2 added tag to pleeeease fix it
Some checks failed
build-linux / publish (push) Failing after 5m34s
2025-03-03 11:49:21 +01:00
967f75fcf6 install all deps
Some checks failed
build-linux / publish (push) Failing after 4m39s
2025-03-03 11:21:08 +01:00
3d63cec5ab install pnpm in pipeline
Some checks failed
build-linux / publish (push) Failing after 4m4s
2025-03-03 11:09:39 +01:00
2eafcd0ee9 pipiline v4
Some checks failed
build-linux / publish (push) Failing after 3m34s
2025-03-03 11:04:16 +01:00
4f42e95f28 pipeline v3
Some checks failed
build-linux / publish (push) Failing after 39s
2025-03-03 11:01:34 +01:00
4 changed files with 65 additions and 30 deletions

View File

@ -0,0 +1,52 @@
name: build
on:
push:
jobs:
windows:
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 mingw-w64 nsis 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: env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_CXXFLAGS="-IC:\msys64\mingw64\include" wails build -ldflags '-extldflags "-static"' -skipbindings -nsis
- name: Archive bins
uses: actions/upload-artifact@v3
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

@ -1,28 +0,0 @@
name: build-linux
on:
push:
jobs:
publish:
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 X-Compile dependencies
run: apt-get update && apt-get install -y mingw-w64 nsis
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: wails build
- name: Archive bins
uses: actions/upload-artifact@v4
with:
name: dist-without-markdown
path: |
dist

View File

@ -1,5 +1,10 @@
# wails template
This is my wails-template i am using for the *ICT-Regiomeisterschaften 2025*.
It uses vanilla svelte with vite in the Frontend. For styling i use Flowbyte and TailwindCSS. I have setup a pipeline to build windows and linux binaries. For windows i have a working installer.
# README
Feel free to use this template on your own. To set it up just run ```setup.sh```. If you're not using gitea you will have to rename the ```.gitea``` folder to ```.github```, to use the pipelines.
Enjoy :)
## Links

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)
}