Fix updater: use Forgejo package registry for stable latest.json URL
Some checks failed
Release / build-and-release (push) Has been cancelled

- Forgejo has no /releases/latest/download/ route (GitHub-specific)
- Upload latest.json to generic package registry for a stable endpoint
- Fix Linux signature collection: use .AppImage.sig (not .tar.gz.sig)
- Collect all platform signatures (.deb.sig, .rpm.sig, .AppImage.sig)
- Bump to v0.4.3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-02-27 21:10:50 -05:00
parent e3ecfce34c
commit 3302d79c38
5 changed files with 51 additions and 12 deletions

View file

@ -59,10 +59,11 @@ jobs:
run: | run: |
mkdir -p release-assets mkdir -p release-assets
cp src-tauri/target/release/bundle/deb/*.deb release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/deb/*.deb release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/deb/*.deb.sig release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/appimage/*.AppImage release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/appimage/*.AppImage release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/appimage/*.AppImage.sig release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz.sig release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/rpm/*.rpm release-assets/ 2>/dev/null || true cp src-tauri/target/release/bundle/rpm/*.rpm release-assets/ 2>/dev/null || true
cp src-tauri/target/release/bundle/rpm/*.rpm.sig release-assets/ 2>/dev/null || true
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe release-assets/ 2>/dev/null || true cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe release-assets/ 2>/dev/null || true
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe.sig release-assets/ 2>/dev/null || true cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe.sig release-assets/ 2>/dev/null || true
ls -la release-assets/ ls -la release-assets/
@ -89,15 +90,15 @@ jobs:
BASE_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/download/${TAG}" BASE_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/download/${TAG}"
LINUX_SIG="" LINUX_SIG=""
APPIMAGE_TAR="" APPIMAGE_FILE=""
WINDOWS_SIG="" WINDOWS_SIG=""
WINDOWS_EXE="" WINDOWS_EXE=""
for f in release-assets/*.AppImage.tar.gz.sig; do for f in release-assets/*.AppImage.sig; do
[ -f "$f" ] && LINUX_SIG=$(cat "$f") [ -f "$f" ] && LINUX_SIG=$(cat "$f")
done done
for f in release-assets/*.AppImage.tar.gz; do for f in release-assets/*.AppImage; do
[ -f "$f" ] && APPIMAGE_TAR=$(basename "$f") [ -f "$f" ] && APPIMAGE_FILE=$(basename "$f")
done done
for f in release-assets/*-setup.exe.sig; do for f in release-assets/*-setup.exe.sig; do
[ -f "$f" ] && WINDOWS_SIG=$(cat "$f") [ -f "$f" ] && WINDOWS_SIG=$(cat "$f")
@ -107,10 +108,10 @@ jobs:
done done
PLATFORMS="{}" PLATFORMS="{}"
if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_TAR" ]; then if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_FILE" ]; then
PLATFORMS=$(echo "$PLATFORMS" | jq \ PLATFORMS=$(echo "$PLATFORMS" | jq \
--arg sig "$LINUX_SIG" \ --arg sig "$LINUX_SIG" \
--arg url "${BASE_URL}/${APPIMAGE_TAR}" \ --arg url "${BASE_URL}/${APPIMAGE_FILE}" \
'. + {"linux-x86_64": {"signature": $sig, "url": $url}}') '. + {"linux-x86_64": {"signature": $sig, "url": $url}}')
fi fi
if [ -n "$WINDOWS_SIG" ] && [ -n "$WINDOWS_EXE" ]; then if [ -n "$WINDOWS_SIG" ] && [ -n "$WINDOWS_EXE" ]; then
@ -192,3 +193,34 @@ jobs:
done done
echo "Release created: ${GITHUB_SERVER_URL}/${REPO}/releases/tag/${TAG}" echo "Release created: ${GITHUB_SERVER_URL}/${REPO}/releases/tag/${TAG}"
- name: Publish latest.json to package registry
env:
FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
API_URL="${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/simpl-resultat/latest"
echo "Uploading latest.json to package registry..."
HTTP_CODE=$(curl -w "%{http_code}" -X PUT \
"${API_URL}/latest.json" \
-H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
--data-binary "@release-assets/latest.json" \
-o /tmp/pkg_response.json)
echo "HTTP $HTTP_CODE"
if [ "$HTTP_CODE" != "201" ] && [ "$HTTP_CODE" != "409" ]; then
echo "Upload failed:"
cat /tmp/pkg_response.json
fi
if [ "$HTTP_CODE" = "409" ]; then
echo "Package version exists, deleting and re-uploading..."
curl -s -X DELETE \
"${API_URL}/latest.json" \
-H "Authorization: token ${FORGEJO_TOKEN}"
HTTP_CODE=$(curl -w "%{http_code}" -X PUT \
"${API_URL}/latest.json" \
-H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
--data-binary "@release-assets/latest.json" \
-o /tmp/pkg_response.json)
echo "Re-upload HTTP $HTTP_CODE"
fi

View file

@ -2,6 +2,13 @@
## [Unreleased] ## [Unreleased]
## [0.4.3]
### Fixed
- Auto-updater endpoint now uses Forgejo package registry for stable URL
- Linux updater signatures (.AppImage.sig) now correctly collected in CI
- All platform signatures (.deb.sig, .rpm.sig) now included in release assets
## [0.4.2] ## [0.4.2]
### Changed ### Changed

View file

@ -1,7 +1,7 @@
{ {
"name": "simpl_result_scaffold", "name": "simpl_result_scaffold",
"private": true, "private": true,
"version": "0.4.2", "version": "0.4.3",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "simpl-result" name = "simpl-result"
version = "0.4.2" version = "0.4.3"
description = "Personal finance management app" description = "Personal finance management app"
authors = ["you"] authors = ["you"]
edition = "2021" edition = "2021"

View file

@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Simpl Resultat", "productName": "Simpl Resultat",
"version": "0.4.2", "version": "0.4.3",
"identifier": "com.simpl.resultat", "identifier": "com.simpl.resultat",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",
@ -37,7 +37,7 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDgyRDc4MDEyQjQ0MzAxRTMKUldUakFVTzBFb0RYZ3NRNmFxMHdnTzBMZzFacTlCbTdtMEU3Ym5pZWNSN3FRZk43R3lZSUM2OHQK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDgyRDc4MDEyQjQ0MzAxRTMKUldUakFVTzBFb0RYZ3NRNmFxMHdnTzBMZzFacTlCbTdtMEU3Ym5pZWNSN3FRZk43R3lZSUM2OHQK",
"endpoints": [ "endpoints": [
"https://git.lacompagniemaximus.com/maximus/simpl-resultat/releases/latest/download/latest.json" "https://git.lacompagniemaximus.com/api/packages/maximus/generic/simpl-resultat/latest/latest.json"
], ],
"windows": { "windows": {
"installMode": "basicUi" "installMode": "basicUi"