release-codeberg: upload all installers for the current version
Docker / Docker Buildx (push) Has been cancelled
Build Debian package / Build package (release) Has been cancelled
Build and Deploy / prepare (release) Has been cancelled
Build and Deploy / Trigger Pro pipeline (release) Has been cancelled
Build and Deploy / Windows arm64 (release) Has been cancelled
Build and Deploy / Windows x64 (release) Has been cancelled
Build and Deploy / macOS (release) Has been cancelled
Build and Deploy / Linux amd64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / Linux arm64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} (release) Has been cancelled
Build and Deploy / Deploy builds to ESS (release) Has been cancelled
Deploy release / Deploy to Cloudflare Pages (release) Has been cancelled

Include deb/flatpak/pacman/tar.gz (not just the Windows exe) so the release page
has every platform's download for the Linux update-ping to link to. Filter by
version so leftover artifacts from older builds in dist/ aren't uploaded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 20:55:29 -07:00
parent c9f73c26fa
commit fb649be700
+9 -2
View File
@@ -35,7 +35,11 @@ const distDir = join(here, "..", "dist");
const authHeaders = { Authorization: `token ${token}` };
// Channel files electron-updater needs + the installers themselves.
const WANTED = [/^latest\.yml$/, /^latest-linux\.yml$/, /\.exe$/, /\.exe\.blockmap$/, /\.AppImage$/, /\.AppImage\.blockmap$/];
// electron-updater channel files (always the current build) — uploaded regardless.
const CHANNEL_FILES = new Set(["latest.yml", "latest-linux.yml"]);
// Installers for this version. The version filter avoids grabbing leftover
// artifacts from previous builds sitting in dist/.
const INSTALLER_EXT = /\.(exe|exe\.blockmap|deb|flatpak|pacman|tar\.gz)$/;
async function api(path, init = {}) {
const res = await fetch(`${API}${path}`, { ...init, headers: { ...authHeaders, ...(init.headers ?? {}) } });
@@ -61,7 +65,10 @@ async function getOrCreateRelease() {
}
async function main() {
const files = (await readdir(distDir)).filter((f) => WANTED.some((re) => re.test(f)));
const version = pkg.version;
const files = (await readdir(distDir)).filter(
(f) => CHANNEL_FILES.has(f) || (f.includes(version) && INSTALLER_EXT.test(f)),
);
if (files.length === 0) {
console.error(`No matching artifacts in ${distDir}. Run \`pnpm run build\` first.`);
process.exit(1);