Fix updater: use Forgejo package registry for stable latest.json URL
Some checks failed
Release / build-and-release (push) Has been cancelled
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:
parent
e3ecfce34c
commit
3302d79c38
5 changed files with 51 additions and 12 deletions
|
|
@ -59,10 +59,11 @@ jobs:
|
|||
run: |
|
||||
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.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.tar.gz 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/appimage/*.AppImage.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.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.sig release-assets/ 2>/dev/null || true
|
||||
ls -la release-assets/
|
||||
|
|
@ -89,15 +90,15 @@ jobs:
|
|||
BASE_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/download/${TAG}"
|
||||
|
||||
LINUX_SIG=""
|
||||
APPIMAGE_TAR=""
|
||||
APPIMAGE_FILE=""
|
||||
WINDOWS_SIG=""
|
||||
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")
|
||||
done
|
||||
for f in release-assets/*.AppImage.tar.gz; do
|
||||
[ -f "$f" ] && APPIMAGE_TAR=$(basename "$f")
|
||||
for f in release-assets/*.AppImage; do
|
||||
[ -f "$f" ] && APPIMAGE_FILE=$(basename "$f")
|
||||
done
|
||||
for f in release-assets/*-setup.exe.sig; do
|
||||
[ -f "$f" ] && WINDOWS_SIG=$(cat "$f")
|
||||
|
|
@ -107,10 +108,10 @@ jobs:
|
|||
done
|
||||
|
||||
PLATFORMS="{}"
|
||||
if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_TAR" ]; then
|
||||
if [ -n "$LINUX_SIG" ] && [ -n "$APPIMAGE_FILE" ]; then
|
||||
PLATFORMS=$(echo "$PLATFORMS" | jq \
|
||||
--arg sig "$LINUX_SIG" \
|
||||
--arg url "${BASE_URL}/${APPIMAGE_TAR}" \
|
||||
--arg url "${BASE_URL}/${APPIMAGE_FILE}" \
|
||||
'. + {"linux-x86_64": {"signature": $sig, "url": $url}}')
|
||||
fi
|
||||
if [ -n "$WINDOWS_SIG" ] && [ -n "$WINDOWS_EXE" ]; then
|
||||
|
|
@ -192,3 +193,34 @@ jobs:
|
|||
done
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
## [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]
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "simpl_result_scaffold",
|
||||
"private": true,
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "simpl-result"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
description = "Personal finance management app"
|
||||
authors = ["you"]
|
||||
edition = "2021"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Simpl Resultat",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"identifier": "com.simpl.resultat",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDgyRDc4MDEyQjQ0MzAxRTMKUldUakFVTzBFb0RYZ3NRNmFxMHdnTzBMZzFacTlCbTdtMEU3Ym5pZWNSN3FRZk43R3lZSUM2OHQK",
|
||||
"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": {
|
||||
"installMode": "basicUi"
|
||||
|
|
|
|||
Loading…
Reference in a new issue