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