diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 39b0266..36b977f 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -627,9 +627,10 @@ jobs: } } + const installer = (name) => /\.(dmg|deb|rpm|msi)$|-Setup\.exe$/.test(name); const lines = []; for (const a of assets) { - if (a.name === 'SHA256SUMS.txt') continue; + if (!installer(a.name)) continue; const res = await github.request( 'GET /repos/{owner}/{repo}/releases/assets/{asset_id}', { owner, repo, asset_id: a.id, headers: { accept: 'application/octet-stream' } } diff --git a/src-tauri/src/updater.rs b/src-tauri/src/updater.rs index 1d886e1..3525d4c 100644 --- a/src-tauri/src/updater.rs +++ b/src-tauri/src/updater.rs @@ -38,13 +38,14 @@ fn channels_for(version: &str) -> &'static [&'static str] { } } -/// Where a channel's two files live: stable, the latest release's assets; -/// beta, one fixed pre-release whose two files each beta replaces. +/// Where a channel's two files live: one fixed pre-release per channel, +/// whose two files each release of that channel replaces, so no release page +/// carries them (the page people download from shows the installers). fn channel_base(channel: &str) -> String { if channel == "beta" { format!("{RELEASES}/download/proofpoll-beta") } else { - format!("{RELEASES}/latest/download") + format!("{RELEASES}/download/proofpoll-stable") } } @@ -475,8 +476,8 @@ mod tests { #[test] fn each_channel_reads_its_own_two_files() { - assert_eq!(latest_json_url("stable"), "https://github.com/WeAreFlowsta/ProofPoll/releases/latest/download/latest.json"); - assert_eq!(manifest_url("stable"), "https://github.com/WeAreFlowsta/ProofPoll/releases/latest/download/release-manifest.json"); + assert_eq!(latest_json_url("stable"), "https://github.com/WeAreFlowsta/ProofPoll/releases/download/proofpoll-stable/latest.json"); + assert_eq!(manifest_url("stable"), "https://github.com/WeAreFlowsta/ProofPoll/releases/download/proofpoll-stable/release-manifest.json"); assert_eq!(manifest_url("beta"), "https://github.com/WeAreFlowsta/ProofPoll/releases/download/proofpoll-beta/release-manifest.json"); }