Set SourceForge per-platform default downloads on release - #486
Merged
Conversation
SourceForge's "Download Latest Version" flag does not auto-follow new uploads, so it stayed pinned to the ancient JSignPdf_setup_2.3.0.exe. After the SFTP upload, call the SourceForge Release API to point each platform's default at the newly published file (windows->msi, mac->dmg, linux->x64 deb, others->full zip). Gated to final releases so pre-releases never become "latest". Requires a new SOURCEFORGE_API_KEY secret.
The API nests the file object under .result with the flags at .result.x_sf.default; the previous check only tested for an error key, so a null/redirect body passed silently. Now require HTTP 200 and the platform present in .result.x_sf.default, and log the raw response. Verified live against the 3.1.0 release folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #485.
SourceForge's per-platform "Download Latest Version" flag does not auto-follow new uploads, so it stayed pinned to the ancient
JSignPdf_setup_2.3.0.exe(reported by @LadaN62 in #479).Change
After the SFTP upload in
publish-release, call the SourceForge Release API to set each platform's default onto the newly published file:windowsjsignpdf-<v>-windows-x64.msimacjsignpdf-<v>-macos-aarch64.dmglinuxjsignpdf-<v>-linux-x64.debothersjsignpdf-<v>-full.zipis-prerelease == 'false'— ALPHA/BETA/RC/MILESTONE never become "latest".Required before this works
Add a repo secret
SOURCEFORGE_API_KEY(the account's Releases API Key from the SourceForge account page). The step errors early if it's missing.Note
The flag only updates on the next final release. To fix the current stale 2.3.0 default sooner, the four API PUTs can be run manually against the current stable files.