@@ -172,10 +172,21 @@ jobs:
172172 echo "Warning: DEB file not found, skipping installer artifact"
173173 fi
174174
175+ # Build distro-agnostic tar.gz archive from the built app tree.
176+ # Source for AUR (roopik-bin) and any non-Debian Linux user.
177+ TARBALL=".artifacts/public/roopik-linux-x64.tar.gz"
178+ tar -czf "$TARBALL" -C .. VSCode-linux-x64
179+ sha256sum "$TARBALL" | awk '{print $1}' > "${TARBALL}.sha256"
180+ cp "$TARBALL" .artifacts/installer/
181+ cp "${TARBALL}.sha256" .artifacts/installer/
182+ cp "$TARBALL" .artifacts/public/roopik-linux-x64-latest.tar.gz
183+ cp "${TARBALL}.sha256" .artifacts/public/roopik-linux-x64-latest.tar.gz.sha256
184+
175185 # List what we're uploading
176186 echo "Artifact contents:"
177187 ls -lah Roopik-Portable-linux-x64/
178188 ls -lah .artifacts/
189+ ls -lah .artifacts/public/
179190
180191 - name : Upload Linux artifacts (x64)
181192 uses : actions/upload-artifact@v6
@@ -202,7 +213,6 @@ jobs:
202213 run : |
203214 set -euo pipefail
204215 endpoint="https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com"
205- prefix="linux/"
206216 deb_file="$(find .artifacts/installer -name 'roopik_*.deb' -type f | head -n 1)"
207217 if [ -z "$deb_file" ]; then
208218 echo "DEB file not found in .artifacts/installer"
@@ -211,7 +221,25 @@ jobs:
211221 export AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID"
212222 export AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY"
213223 export AWS_EC2_METADATA_DISABLED=true
214- aws s3 cp "$deb_file" "s3://${R2_BUCKET}/${prefix}roopik-linux-latest.deb" --endpoint-url "$endpoint" --no-progress
224+
225+ # Per-format folders so each install type has its own update channel.
226+ # A .deb install must only ever see .deb updates; an arch/tarball
227+ # install must only see tarball updates. They cannot share a manifest.
228+ aws s3 cp "$deb_file" "s3://${R2_BUCKET}/linux/deb/roopik-linux-latest.deb" --endpoint-url "$endpoint" --no-progress
229+ # Back-compat: keep the legacy path so already-installed clients
230+ # pointing at linux/roopik-linux-latest.deb keep updating.
231+ aws s3 cp "$deb_file" "s3://${R2_BUCKET}/linux/roopik-linux-latest.deb" --endpoint-url "$endpoint" --no-progress
232+
233+ tarball=".artifacts/public/roopik-linux-x64-latest.tar.gz"
234+ tarball_sha_file="${tarball}.sha256"
235+ tarball_present=0
236+ if [ -f "$tarball" ]; then
237+ tarball_present=1
238+ aws s3 cp "$tarball" "s3://${R2_BUCKET}/linux/archive/roopik-linux-x64-latest.tar.gz" --endpoint-url "$endpoint" --no-progress
239+ aws s3 cp "$tarball_sha_file" "s3://${R2_BUCKET}/linux/archive/roopik-linux-x64-latest.tar.gz.sha256" --endpoint-url "$endpoint" --no-progress
240+ else
241+ echo "Tarball not found at $tarball, skipping tarball upload."
242+ fi
215243
216244 if [ -z "${R2_PUBLIC_BASE_URL:-}" ]; then
217245 echo "R2_PUBLIC_BASE_URL not set, skipping update manifest upload."
@@ -220,13 +248,24 @@ jobs:
220248
221249 version="$(node -p "require('./package.json').version")"
222250 commit="${{ github.sha }}"
223- hash ="$(sha256sum "$deb_file" | awk '{print tolower($1)}')"
251+ deb_hash ="$(sha256sum "$deb_file" | awk '{print tolower($1)}')"
224252 pub_date="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
225253 base="${R2_PUBLIC_BASE_URL%/}"
226- url="${base}/linux/roopik-linux-latest.deb"
227- # CRITICAL: 'version' must be the commit hash for update comparison
228- # 'productVersion' is the human-readable version (e.g., "1.109.0")
229- json="$(printf '{"version":"%s","productVersion":"%s","url":"%s","sha256hash":"%s","pub_date":"%s"}' "$commit" "$version" "$url" "$hash" "$pub_date")"
230- printf '%s' "$json" > latest.json
231- aws s3 cp latest.json "s3://${R2_BUCKET}/linux/stable/latest.json" --endpoint-url "$endpoint" --no-progress
254+
255+ # --- DEB channel manifest ---
256+ deb_url="${base}/linux/deb/roopik-linux-latest.deb"
257+ deb_json="$(printf '{"version":"%s","productVersion":"%s","url":"%s","sha256hash":"%s","pub_date":"%s"}' "$commit" "$version" "$deb_url" "$deb_hash" "$pub_date")"
258+ printf '%s' "$deb_json" > latest-deb.json
259+ aws s3 cp latest-deb.json "s3://${R2_BUCKET}/linux/deb/stable/latest.json" --endpoint-url "$endpoint" --no-progress
260+ # Back-compat: legacy manifest path used by older installs.
261+ aws s3 cp latest-deb.json "s3://${R2_BUCKET}/linux/stable/latest.json" --endpoint-url "$endpoint" --no-progress
262+
263+ # --- Archive (tar.gz) channel manifest ---
264+ if [ "$tarball_present" = "1" ]; then
265+ tarball_url="${base}/linux/archive/roopik-linux-x64-latest.tar.gz"
266+ tarball_hash="$(sha256sum "$tarball" | awk '{print tolower($1)}')"
267+ archive_json="$(printf '{"version":"%s","productVersion":"%s","url":"%s","sha256hash":"%s","pub_date":"%s"}' "$commit" "$version" "$tarball_url" "$tarball_hash" "$pub_date")"
268+ printf '%s' "$archive_json" > latest-archive.json
269+ aws s3 cp latest-archive.json "s3://${R2_BUCKET}/linux/archive/stable/latest.json" --endpoint-url "$endpoint" --no-progress
270+ fi
232271
0 commit comments