mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 04:34:08 +01:00
Paketquellen (Homebrew, apt, winget) und Webseite auf GitHub Pages
- release.yml baut .deb (amd64, arm64) und schreibt Formula/sshtermy.rb - pages.yml: Webseite (site/, en + de, GIFs) und apt-Quelle unter /apt - winget.yml: Einreichung bei winget-pkgs von Hand (Secret WINGET_TOKEN) - Bei Homebrew/apt-Installation kein Selbst-Update, stattdessen Befehl - tools/dev/gifs: Aufnahme der GIFs aus der echten App Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUfgD3KuJTKRbUm5tK6
This commit is contained in:
44 files changed
+1322
-46
No files matched your search
@@ -18,3 +18,10 @@ jobs:
|
||||
for t in windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64; do
|
||||
CGO_ENABLED=0 GOOS=${t%/*} GOARCH=${t#*/} go build -o /dev/null ./cmd/sshtermy
|
||||
done
|
||||
|
||||
packaging:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: sudo apt-get install -y -qq apt-utils python3-yaml >/dev/null
|
||||
- run: packaging/check.sh
|
||||
@@ -0,0 +1,64 @@
|
||||
# Webseite (site/, Englisch + Deutsch) und apt-Paketquelle auf GitHub Pages:
|
||||
# https://db9979.github.io/sshtermy/ Anleitung
|
||||
# https://db9979.github.io/sshtermy/apt/ apt-Quelle (.deb aus dem neuesten Release)
|
||||
# Läuft nach jedem Release und bei Änderungen an der Webseite.
|
||||
# Einmalig nötig: Settings → Pages → Source „GitHub Actions“.
|
||||
name: pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ["site/**", "docs/bilder/**", "packaging/apt-repo.sh", ".github/workflows/pages.yml"]
|
||||
workflow_run:
|
||||
workflows: [release]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Webseite zusammenstellen
|
||||
run: |
|
||||
mkdir -p _site
|
||||
cp -r site/. _site/
|
||||
mkdir -p _site/bilder && cp docs/bilder/*.png _site/bilder/
|
||||
|
||||
- name: apt-Quelle aus dem neuesten Release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
APT_GPG_PRIVATE_KEY: ${{ secrets.APT_GPG_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p _site/apt
|
||||
gh release download --repo "$GITHUB_REPOSITORY" --pattern '*.deb' --dir _site/apt || echo "noch kein Release mit .deb"
|
||||
sudo apt-get install -y -qq apt-utils >/dev/null
|
||||
packaging/apt-repo.sh _site/apt
|
||||
ls -la _site/apt
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: _site
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.d.outputs.page_url }}
|
||||
steps:
|
||||
- id: d
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -1,12 +1,14 @@
|
||||
# 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/**", "**.md"]
|
||||
paths-ignore: ["docs/**", "site/**", "Formula/**", "**.md"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -59,6 +61,13 @@ jobs:
|
||||
done
|
||||
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
|
||||
|
||||
- name: Debian-Pakete (amd64, arm64)
|
||||
run: |
|
||||
for a in amd64 arm64; do
|
||||
packaging/deb.sh ${{ steps.v.outputs.version }} $a dist/sshtermy_linux_$a dist
|
||||
done
|
||||
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
|
||||
|
||||
- name: Signieren (Ed25519)
|
||||
env:
|
||||
UPDATE_SIGNING_KEY: ${{ secrets.UPDATE_SIGNING_KEY }}
|
||||
@@ -70,7 +79,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
V=${{ steps.v.outputs.version }}
|
||||
gh release create "v$V" dist/* --title "sshTermy v$V" --notes-file notes.md --latest
|
||||
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:
|
||||
@@ -79,3 +88,20 @@ jobs:
|
||||
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
|
||||
@@ -0,0 +1,36 @@
|
||||
# Neueste Version bei winget einreichen (Pull Request an microsoft/winget-pkgs).
|
||||
# Von Hand starten (Actions → winget → Run workflow), nicht bei jedem Release:
|
||||
# jede Einreichung prüfen dort Menschen, tägliche PRs wären zu viel.
|
||||
# Einmalig nötig: Secret WINGET_TOKEN = klassischer GitHub-Token mit „public_repo“
|
||||
# (wingetcreate legt damit einen Fork von winget-pkgs im eigenen Konto an).
|
||||
name: winget
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
submit:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Manifeste für das neueste Release schreiben
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tag=$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)
|
||||
gh release download "$tag" --repo "$GITHUB_REPOSITORY" --pattern checksums.txt --dir rel
|
||||
packaging/winget.sh "${tag#v}" rel/checksums.txt out
|
||||
echo "DIR=$(cygpath -w "$(ls -d out/manifests/d/db9979/sshTermy/*)")" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Einreichen
|
||||
env:
|
||||
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
|
||||
run: |
|
||||
if (-not $env:WINGET_TOKEN) { throw "Secret WINGET_TOKEN fehlt (siehe Kommentar oben in winget.yml)" }
|
||||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||
.\wingetcreate.exe submit --token $env:WINGET_TOKEN $env:DIR
|
||||
Reference in new issue
Block a user