Move CI to Gitea Actions
All checks were successful
ci / test (push) Successful in 4m20s
ci / release (push) Has been skipped

Single-runner workflow: test on every push; on v* tags cross-compile tefterd
for all platforms, build the Linux desktop app, and publish a Gitea release
via gitea.com/actions/release-action. Drop the GitHub workflow; document the
runner requirement and manual macOS/Windows desktop builds in the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 07:33:11 +02:00
parent 58063ff901
commit 2e9b6d164c
3 changed files with 89 additions and 113 deletions

72
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,72 @@
name: ci
# Gitea Actions (repo has Actions enabled; needs one Linux runner whose
# `ubuntu-latest` label maps to a Debian/Ubuntu-based image, e.g. the default
# catthehacker/ubuntu:act-latest). Everything runs on that single runner:
# tefterd is CGO-free and cross-compiles to all four platforms from Linux.
# The macOS/Windows *desktop* shells can't be built on a Linux runner — build
# those manually with `make desktop` on such a machine (see README).
on:
push:
branches: ['**']
tags: ['v*']
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: 'stable' }
- uses: actions/setup-node@v4
with: { node-version: '22' }
- name: Build frontend
run: make frontend
- name: Embed bundle
run: rm -rf server/webdist/dist && cp -r frontend/dist server/webdist/dist
- name: Vet + tests
run: cd server && go vet ./... && go test ./...
- name: Type-check frontend
run: cd frontend && npx svelte-check --tsconfig ./tsconfig.json
release:
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: 'stable' }
- uses: actions/setup-node@v4
with: { node-version: '22' }
- name: Desktop build deps (GTK/WebKit)
run: |
if command -v sudo >/dev/null; then SUDO=sudo; else SUDO=; fi
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
build-essential pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev libx11-dev
- name: Install Wails CLI
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build tefterd for all platforms
run: make server-all VERSION=${{ github.ref_name }}
- name: Build desktop (linux/amd64)
run: |
rm -rf desktop/frontend/dist
cp -r frontend/dist desktop/frontend/dist
cd desktop && PATH="$PATH:$(go env GOPATH)/bin" \
wails build -tags webkit2_41 -ldflags "-X main.Version=${{ github.ref_name }}"
- name: Package artifacts
run: |
mkdir -p out pkg
cp build/tefterd-* out/
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 out/tefter-desktop-linux-amd64.tar.gz .
ls -la out/
- name: Create Gitea release
uses: https://gitea.com/actions/release-action@main
with:
files: out/**
api_key: '${{ secrets.GITHUB_TOKEN }}'

View File

@@ -1,113 +0,0 @@
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

View File

@@ -106,5 +106,22 @@ make server-all # linux/amd64, linux/arm64, darwin/arm64, windows/amd64
make desktop # Wails build (needs wails CLI + GTK/WebKit dev packages on Linux)
```
## CI / Releases (Gitea Actions)
`.gitea/workflows/ci.yml` runs tests on every push and, on a `v*` tag, builds
`tefterd` for all four platforms plus the Linux desktop app and attaches them
to a Gitea release. Requirements: Actions enabled on the repo and one Linux
runner whose `ubuntu-latest` label maps to a Debian/Ubuntu-based image (the
default `catthehacker/ubuntu:act-latest` works).
```sh
git tag v0.1.0 && git push origin v0.1.0 # cut a release
```
macOS/Windows desktop shells need a native machine: install Go + Node + the
Wails CLI there and run `make desktop` (the result lands in
`desktop/build/bin/`). The server binaries for those platforms come out of the
Linux runner via cross-compilation.
Repo layout: `frontend/` (Svelte + TS, all app logic incl. offline store + sync engine),
`server/` (Go, stdlib HTTP + modernc.org/sqlite, no CGO), `desktop/` (Wails shell).