Files
sshtermy/.github/workflows/release.yml
T
db9979andClaude Opus 5.5 5b029c5164 Release-Signatur: Schlüssel tolerant lesen und klare Fehlermeldung (#84)
* Debug-Protokoll für Fehlerberichte, Barrierearm-Modus und Farbenblind-Themes

- internal/debuglog: Ereignisse (SSH-Aufbau, Abbrüche, Updates, KI-Anfragen, Sync), Rotation 4 MiB
- Schalter in Einstellungen, --debug, bereinigte Kopie (crash.Clean) nach Downloads
- Barrierearm: keine Animationen, × für nicht erreichbar, Startanimation aus; geht mit dem Sync
- Themes Farbenblind dunkel/hell (Okabe-Ito)
- README, README.de, Webseite, Kurzreferenz

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz

* Release-Signatur: Schlüssel tolerant lesen, klare Fehlermeldung, Abgleich mit UPDATE_PUBKEY

Der Release-Lauf nach #81 brach mit „UPDATE_SIGNING_KEY fehlt oder ist ungültig“ ab.
sshtermy-sign ignoriert jetzt Zeilenumbrüche, Leerzeichen, Anführungszeichen und die
keygen-Überschrift, nennt bei Fehlern die gefundene Länge (nie den Schlüssel) und
prüft, dass der private Schlüssel zu UPDATE_PUBKEY passt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 14:37:00 +01:00

125 lines
5.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Bei jedem Push auf main: testen, Version hochzählen (MAJOR.MINOR aus VERSION,
# PATCH = Anzahl Commits), für alle Plattformen bauen, signieren und als
# GitHub Release veröffentlichen. Die App findet das Release per Auto-Update.
# Dazu: .deb-Pakete (apt-Quelle baut pages.yml) und die Homebrew-Formel
# (Formula/sshtermy.rb, dieses Repo ist der Tap). winget: winget.yml.
name: release
on:
push:
branches: [main]
paths-ignore: ["docs/**", "site/**", "Formula/**", "**.md"]
workflow_dispatch:
permissions:
contents: write
pull-requests: read # PR-Beschreibungen für den Changelog
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.26.x"
check-latest: true
- name: Tests
run: go vet ./... && go test ./...
- name: Version bestimmen
id: v
run: |
V="$(cat VERSION).$(git rev-list --count HEAD)"
echo "version=$V" >> "$GITHUB_OUTPUT"
echo "sshTermy v$V"
- name: Changelog erzeugen („Was ist neu“ in der App + Release-Notizen)
env:
GH_TOKEN: ${{ github.token }}
run: |
go run ./tools/changelog -out internal/changelog/CHANGELOG.md -notes notes.md
head -20 internal/changelog/CHANGELOG.md
- name: Bauen (windows arm64/386/amd64, darwin arm64/amd64, linux amd64/arm64/arm/riscv64)
env:
UPDATE_PUBKEY: ${{ vars.UPDATE_PUBKEY }}
run: |
PKG=github.com/db9979/sshtermy/internal/version
LDF="-s -w -X $PKG.Version=${{ steps.v.outputs.version }} -X $PKG.Commit=${GITHUB_SHA::7} -X $PKG.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X $PKG.UpdatePubKey=$UPDATE_PUBKEY"
mkdir -p dist
for t in windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 linux/arm linux/riscv64; do
os=${t%/*}; arch=${t#*/}; ext=""; [ "$os" = windows ] && ext=".exe"
# linux/arm = 32-Bit-ARMv7 (Raspberry Pi OS armhf, z. B. uConsole mit CM3/CM4)
CGO_ENABLED=0 GOARM=7 GOOS=$os GOARCH=$arch go build -trimpath -ldflags "$LDF" -o "dist/sshtermy_${os}_${arch}${ext}" ./cmd/sshtermy
done
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
- name: Debian-Pakete (amd64, arm64, armhf, riscv64)
run: |
for a in amd64 arm64 armhf riscv64; do
b=$a; [ $a = armhf ] && b=arm
packaging/deb.sh ${{ steps.v.outputs.version }} $a dist/sshtermy_linux_$b dist
done
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
- name: Signieren (Ed25519)
env:
UPDATE_SIGNING_KEY: ${{ secrets.UPDATE_SIGNING_KEY }}
UPDATE_PUBKEY: ${{ vars.UPDATE_PUBKEY }}
if: env.UPDATE_SIGNING_KEY != ''
run: go run ./cmd/sshtermy-sign sign dist/checksums.txt
- name: Hinweis, wenn unsigniert
env:
UPDATE_SIGNING_KEY: ${{ secrets.UPDATE_SIGNING_KEY }}
UPDATE_PUBKEY: ${{ vars.UPDATE_PUBKEY }}
if: env.UPDATE_SIGNING_KEY == '' || env.UPDATE_PUBKEY == ''
run: |
# Public Key ohne Secret: die neue App würde jedes spätere Update ablehnen
if [ -n "$UPDATE_PUBKEY" ]; then
echo "::error title=Signierschlüssel fehlt::UPDATE_PUBKEY ist gesetzt, das Secret UPDATE_SIGNING_KEY fehlt – docs/signatur.md"
exit 1
fi
echo "::warning title=Release unsigniert::UPDATE_PUBKEY und UPDATE_SIGNING_KEY fehlen – Anleitung in docs/signatur.md"
- name: Release veröffentlichen
env:
GH_TOKEN: ${{ github.token }}
run: |
V=${{ steps.v.outputs.version }}
gh release create "v$V" dist/sshtermy_* dist/checksums.txt* --title "sshTermy v$V" --notes-file notes.md --latest
- name: Alte Releases aufräumen (die letzten 10 bleiben)
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release list --limit 100 --json tagName --jq '.[10:][].tagName' | while read -r tag; do
gh release delete "$tag" --yes --cleanup-tag || true
done
- name: Homebrew-Formel aktualisieren (Formula/sshtermy.rb in main)
continue-on-error: true # z. B. Branch-Schutz: Release ist trotzdem draußen
run: |
V=${{ steps.v.outputs.version }}
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
for i in 1 2 3 4; do
git fetch -q origin main && git checkout -q -f -B formula origin/main
mkdir -p Formula && packaging/formula.sh "$V" dist/checksums.txt > Formula/sshtermy.rb
git add Formula/sshtermy.rb
git diff --cached --quiet && exit 0
git commit -q -m "Homebrew-Formel für v$V"
git push -q origin HEAD:main && exit 0
sleep $((i * 3))
done
exit 1