`git tag --sort=-v:refname | grep -A1 -x -F "$TAG"` matches nothing when
$TAG is not an existing tag, which is the normal case for a
workflow_dispatch run: the release is published for a tag nobody has
pushed and Gitea creates it. grep then exits 1, and under
`set -e -o pipefail` that took the step down before the first echo, so
the log showed exit code 1 and no output at all.
$TAG is now injected into the list before sorting, so the match is
guaranteed and the line before it is the real predecessor. `sort -uV`
also orders v2.9 before v2.10, which -v:refname over a list missing $TAG
could not.
Also asserts the token is non-empty up front rather than failing on an
opaque 401 several curls later.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drops docker/login-action, docker/setup-buildx-action and
docker/build-push-action. This is a single-platform build of one
Dockerfile, which dockerd's integrated BuildKit already does; the only
thing the actions added was buildx's docker-container driver, and
standing that up means pulling moby/buildkit and handing it the socket
for no gain.
docker login reads the token from stdin rather than -p, and a logout step
runs with always() so a failed build does not leave credentials in
~/.docker/config.json on this persistent runner.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`locale-gen <name>` is an Ubuntu extension; plain Debian's locale-gen
takes no arguments and only reads /etc/locale.gen, so the previous fix
generated nothing and makensis kept aborting with exit 84 / "FATAL: main
argv conversion failed!" under the runner's C/POSIX locale.
Write the entry into /etc/locale.gen, run locale-gen with no arguments,
and assert `locale -a` lists it — a missing locale now fails the install
step with a clear message instead of dying four minutes later inside
electron-builder.
build-release.ps1 sets LC_ALL/LANG itself before packaging a Windows
target on a Linux host, picking a real UTF-8 locale out of `locale -a`.
The electron-builder child then inherits it however the script was
started, including a runner that drops step env.
Also adds a non-fatal probe step that runs the cached makensis with
-VERSION under en_US.UTF-8 and under C, so a failure that is *not* the
locale is distinguishable from one that is without another blind fix.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
C.UTF-8 is a glibc built-in only from 2.35 (Debian 12+) onward; on an
older Debian runner setlocale() silently falls back to POSIX, which is
exactly the "main argv conversion failed!" crash from before. Install
locales and generate en_US.UTF-8 explicitly instead, which works on any
Debian version.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
C.UTF-8 for the win/AppImage build step: Wine's makensis was aborting
with ERR_ELECTRON_BUILDER_CANNOT_EXECUTE / "main argv conversion
failed!" under the runner's default C/POSIX locale.
Gitea rejects secret names starting with GITEA, so the registry/API
credentials are now BUILD_USER/BUILD_TOKEN.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The registered Gitea Actions runner is a persistent Debian host labeled
docker-build, not ubuntu-latest. Debian ships no snapd by default, so
swap the PowerShell bootstrap for Microsoft's portable linux-x64
tarball, which needs only curl/tar.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Gitea Actions workflow triggered on tag push or manual dispatch: builds
the Windows NSIS/portable installers and Linux AppImage, builds+pushes
the Docker image, then creates/updates the Gitea release with a
changelog-compare link as the body and all artifacts attached. Flatpak
stays local-only (build-release.ps1) since flatpak-builder's sandbox
isn't reliable on a containerized Actions runner.
Also fixes build-release.ps1: the win.signExecutable=false override
only applied when cross-building via the WSL path, not to a genuine
native-Linux build of the "win" target (the CI's case).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>