diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 856271f..987ef1f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,10 +40,8 @@ jobs: env: TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | - # Extract version from built artifact filename - $nsis = "src-tauri\target\release\bundle\nsis" - $setupExe = Get-ChildItem "$nsis\Cinny_*_x64-setup.exe" | Select-Object -First 1 - $VERSION = $setupExe.Name -replace 'Cinny_(.+)_x64-setup\.exe','$1' + # Read version from tauri.conf.json — no fragile filename parsing + $VERSION = (Get-Content "src-tauri\tauri.conf.json" | ConvertFrom-Json).version Write-Host "Version: $VERSION" # Get or create the latest release @@ -59,9 +57,9 @@ jobs: $nsis = "src-tauri\target\release\bundle\nsis" $files = @( - "$nsis\Cinny_${VERSION}_x64-setup.exe", - "$nsis\Cinny_${VERSION}_x64-setup.nsis.zip", - "$nsis\Cinny_${VERSION}_x64-setup.nsis.zip.sig" + "$nsis\Lotus Chat_${VERSION}_x64-setup.exe", + "$nsis\Lotus Chat_${VERSION}_x64-setup.nsis.zip", + "$nsis\Lotus Chat_${VERSION}_x64-setup.nsis.zip.sig" ) $names = @("LotusChat-x86_64-setup.exe", "LotusChat-x86_64-setup.nsis.zip", "LotusChat-x86_64-setup.nsis.zip.sig") for ($i = 0; $i -lt $files.Length; $i++) { @@ -120,17 +118,20 @@ jobs: TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '' NODE_OPTIONS: '--max_old_space_size=4096' - run: npm run tauri -- build + # AppImage requires downloading AppRun from GitHub which times out in this runner. + # Build deb only; AppImage can be re-enabled once network access to GitHub is confirmed. + run: npm run tauri -- build -- --bundles deb - name: Upload to release env: TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | - # Extract version from built artifact filename — no file reads needed - DEB=$(ls src-tauri/target/release/bundle/deb/Cinny_*_amd64.deb | head -1) - VERSION=$(basename "$DEB" | sed 's/Cinny_\(.*\)_amd64\.deb/\1/') + # Read version from tauri.conf.json — no fragile filename parsing + VERSION=$(python3 -c "import json; print(json.load(open('src-tauri/tauri.conf.json'))['version'])") echo "Version: $VERSION" + DEB="src-tauri/target/release/bundle/deb/Lotus Chat_${VERSION}_amd64.deb" + # Get or create the latest release RELEASE=$(curl -sf "$GITEA_URL/api/v1/repos/$REPO/releases/tags/latest" \ -H "Authorization: token $TOKEN" 2>/dev/null || true) @@ -143,15 +144,10 @@ jobs: | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") fi - APPIMAGE="src-tauri/target/release/bundle/appimage/Cinny_${VERSION}_amd64.AppImage" for file in \ - "LotusChat-x86_64.deb|$DEB" \ - "LotusChat-x86_64.AppImage|${APPIMAGE}" \ - "LotusChat-x86_64.AppImage.tar.gz|${APPIMAGE}.tar.gz" \ - "LotusChat-x86_64.AppImage.tar.gz.sig|${APPIMAGE}.tar.gz.sig"; do + "LotusChat-x86_64.deb|$DEB"; do name="${file%%|*}" path="${file##*|}" - # Delete existing asset with same name if present existing_id=$(curl -sf "$GITEA_URL/api/v1/repos/$REPO/releases/$RELEASE_ID/assets" \ -H "Authorization: token $TOKEN" \ | python3 -c "import sys,json; assets=json.load(sys.stdin); print(next((str(a['id']) for a in assets if a['name']=='$name'), ''))" 2>/dev/null || true) @@ -181,7 +177,6 @@ jobs: BASE="$GITEA_URL/LotusGuild/cinny-desktop/releases/download/latest" WIN_SIG=$(curl -sf "$BASE/LotusChat-x86_64-setup.nsis.zip.sig") - LINUX_SIG=$(curl -sf "$BASE/LotusChat-x86_64.AppImage.tar.gz.sig") RELEASE=$(curl -sf "$GITEA_URL/api/v1/repos/$REPO/releases/tags/latest" \ -H "Authorization: token $TOKEN") @@ -199,10 +194,6 @@ manifest = { 'windows-x86_64': { 'url': '$BASE/LotusChat-x86_64-setup.nsis.zip', 'signature': '''$WIN_SIG''' - }, - 'linux-x86_64': { - 'url': '$BASE/LotusChat-x86_64.AppImage.tar.gz', - 'signature': '''$LINUX_SIG''' } } }