Files
tefter/.github/workflows/release.yml
Senad Uka 175c89e400 Implement Tefter per SPEC.md: NV-style notes with server, sync, PWA, desktop
- frontend/: Svelte 4 + TS + Vite app — omnibar (search-and-create), ranked
  diacritic-insensitive filtering, CodeMirror 6 markdown editor with 400ms
  autosave, marked+DOMPurify preview with [[wiki-links]], tag filter, undo
  toast, light/dark, narrow-screen stacked layout, IndexedDB store, pull-then-
  push sync engine with conflict handling, versioned cache-first service
  worker + manifest (installable PWA)
- server/: tefterd — Go stdlib HTTP + modernc.org/sqlite, /api/v1 sync API
  (changes/batch/health/import), SHA-256 hashed bearer token, LWW-with-
  conflict-copies push rules, subcommands: init, token rotate, import
  simplenote, compact, backup (VACUUM INTO); embeds the frontend bundle
- desktop/: Wails v2 shell — single instance, hide-to-tray (fyne systray),
  global Ctrl+Shift+Space hotkey, quit-on-close flag
- Simplenote import (CLI + web upload), idempotent via source_id dedupe;
  verified against a real 242-note export
- Makefile (frontend/server/server-all/desktop/test), GitHub release workflow,
  README with systemd/Caddy/backup docs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 07:16:01 +02:00

114 lines
3.6 KiB
YAML

name: release
on:
push:
tags: ['v*']
workflow_dispatch:
env:
NODE_VERSION: '22'
GO_VERSION: 'stable'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '22' }
- uses: actions/setup-go@v5
with: { go-version: 'stable' }
- name: Build frontend
run: make frontend && rm -rf server/webdist/dist && cp -r frontend/dist server/webdist/dist
- name: Go tests
run: cd server && go vet ./... && go test ./...
server:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '22' }
- uses: actions/setup-go@v5
with: { go-version: 'stable' }
- name: Build tefterd for all platforms
run: make server-all VERSION=${{ github.ref_name }}
- uses: actions/upload-artifact@v4
with:
name: tefterd
path: build/tefterd-*
desktop:
needs: test
strategy:
matrix:
include:
- os: ubuntu-latest
artifact: tefter-desktop-linux
- os: macos-latest
artifact: tefter-desktop-macos
- os: windows-latest
artifact: tefter-desktop-windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '22' }
- uses: actions/setup-go@v5
with: { go-version: 'stable' }
- name: Linux deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libx11-dev
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build frontend
run: make frontend VERSION=${{ github.ref_name }}
- name: Copy bundle into desktop
shell: bash
run: |
rm -rf desktop/frontend/dist
mkdir -p desktop/frontend
cp -r frontend/dist desktop/frontend/dist
- name: Wails build (Linux)
if: runner.os == 'Linux'
run: cd desktop && wails build -tags webkit2_41 -ldflags "-X main.Version=${{ github.ref_name }}"
- name: Wails build (macOS)
if: runner.os == 'macOS'
run: |
cd desktop && wails build -ldflags "-X main.Version=${{ github.ref_name }}"
cd build/bin && zip -r Tefter.app.zip Tefter.app
- name: Wails build (Windows)
if: runner.os == 'Windows'
run: cd desktop && wails build -ldflags "-X main.Version=${{ github.ref_name }}"
- name: Package Linux artifact (.desktop file included)
if: runner.os == 'Linux'
run: |
mkdir -p pkg
cp desktop/build/bin/tefter-desktop pkg/
cp desktop/tefter.desktop pkg/
cp frontend/public/icon-512.png pkg/tefter.png
tar -C pkg -czf tefter-desktop-linux-amd64.tar.gz .
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
tefter-desktop-linux-amd64.tar.gz
desktop/build/bin/Tefter.app.zip
desktop/build/bin/tefter-desktop.exe
if-no-files-found: ignore
release:
needs: [server, desktop]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with: { merge-multiple: true, path: dist }
- uses: softprops/action-gh-release@v2
with:
files: dist/**
generate_release_notes: true