The release flow previously promoted a tag to "latest" the moment the CLI publish step completed (via `gh release create --latest`). The desktop build then ran for another 15-20 min before attaching DMG/zip/exe/AppImage/ deb/rpm/latest*.yml, leaving `/releases/latest/download/<desktop-asset>` to 404 for any user hitting it during that window. Create the release as a draft instead, and flip `--draft=false` as the final step of publish-desktop.yml once every asset is uploaded. GitHub auto-promotes the undrafted release to "latest" based on semver. While in draft, `/releases/latest/...` continues to redirect to the previous release, so install.sh and the download links in release notes keep working. Also harden the upload loop: drop the `|| true` that was swallowing upload failures, switch to `set -euo pipefail` and process substitution so a failed `gh release upload` aborts the job instead of silently leaving the release short an asset.
Showing the changes to .github (1 of 2 files). Show all
Unified · Split
| @@ -170,10 +170,18 @@ jobs: · 169 unmodified lines | |||
| 170 | env: | 170 | env: |
| 171 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | 171 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 172 | run: | | 172 | run: | |
| 173 | find artifacts -type f \ | 173 | set -euo pipefail |
| 174 | while IFS= read -r file; do | ||
| 175 | echo "Uploading: $file" | ||
| 176 | gh release upload "$RELEASE_TAG" "$file" --repo "$GITHUB_REPOSITORY" --clobber | ||
| 177 | done < <(find artifacts -type f \ | ||
| 174 | \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" \ | 178 | \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" \ |
| 175 | -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" \ | 179 | -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" \ |
| 176 | -o -name "latest*.yml" \) | while read file; do | 180 | -o -name "latest*.yml" \)) |
| 177 | echo "Uploading: $file" | 181 | |
| 178 | gh release upload "$RELEASE_TAG" "$file" --repo "$GITHUB_REPOSITORY" --clobber || true | 182 | # Flip draft → published only after every desktop asset is uploaded — |
| 179 | done | 183 | # this is the atomic point where the new tag becomes "latest". |
| 184 | - name: Promote release (draft → published) | ||
| 185 | env: | ||
| 186 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| 187 | run: gh release edit "$RELEASE_TAG" --draft=false --repo "$GITHUB_REPOSITORY" | ||