Skip to content

feat: add verified stable, beta, and nightly release channels - #488

Merged
khaira777 merged 7 commits into
mainfrom
fm/flocafe-466-release-channels
Aug 23, 2026
Merged

khaira777 merged 7 commits into
mainfrom
fm/flocafe-466-release-channels

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Intent

Implement FloCafe #466 and the accepted D4 release-channel design: create GitHub releases as drafts until post-upload verification passes; use safe lowercase artifact names; provide stable, beta, and nightly opt-in channels; keep stable on latest*.yml while beta/nightly use channel-prefixed updater manifests; make stable promotion to GitHub Latest explicit rather than automatic; build platform artifacts with electron-builder --publish never and let the workflow own uploads and verification; keep store-delivered AppX/MAS/Snap packages outside electron-updater's channel behavior; preserve offline-first operation and existing customer data; validate the committed feature branch, push it, create a PR with body 'Fixes #466 Refs #463', and drive CI green without merging.

What Changed

  • Added channel-aware release publishing for stable, beta, and nightly builds, including draft releases, channel-specific updater manifests, post-upload verification, and explicit stable Latest promotion.
  • Switched platform release builds to electron-builder --publish never, standardized safe lowercase artifact names, and kept store-delivered AppX/MAS and Snap packages outside electron-updater channel behavior.
  • Added release asset inventory and SHA-512 verification scripts/tests, updater channel selection from prerelease versions, and release-process documentation.

Risk Assessment

🚨 High: The current verifier blocks all normal Linux releases, while the promotion path can expose an unverified release as the stable update target.

Testing

Fresh focused tests and end-to-end verifier simulations passed for all three channels. No full suite or linters were run per the assigned test-phase boundary; no rendered UI evidence applies to this CI/release workflow change.

Evidence: Stable, beta, and nightly verifier evidence
verified latest.yml: flocafe-3.3.0-win-x64.exe (33 bytes, SHA-512 ok)
verified latest-mac.yml: flocafe-3.3.0-mac-x64.zip (33 bytes, SHA-512 ok)
verified latest-mac.yml: flocafe-3.3.0-mac-arm64.zip (35 bytes, SHA-512 ok)
verified latest-linux.yml: flocafe-3.3.0-linux-x64.appimage (40 bytes, SHA-512 ok)
verified latest-linux-arm64.yml: flocafe-3.3.0-linux-arm64.appimage (42 bytes, SHA-512 ok)
release 3.3.0 channel latest passed draft asset verification
verified beta.yml: flocafe-3.3.0-beta.1-win-x64.exe (40 bytes, SHA-512 ok)
verified beta-mac.yml: flocafe-3.3.0-beta.1-mac-x64.zip (40 bytes, SHA-512 ok)
verified beta-mac.yml: flocafe-3.3.0-beta.1-mac-arm64.zip (42 bytes, SHA-512 ok)
verified beta-linux.yml: flocafe-3.3.0-beta.1-linux-x64.appimage (47 bytes, SHA-512 ok)
verified beta-linux-arm64.yml: flocafe-3.3.0-beta.1-linux-arm64.appimage (49 bytes, SHA-512 ok)
release 3.3.0-beta.1 channel beta passed draft asset verification
verified nightly.yml: flocafe-3.3.0-nightly.20260823-win-x64.exe (50 bytes, SHA-512 ok)
verified nightly-mac.yml: flocafe-3.3.0-nightly.20260823-mac-x64.zip (50 bytes, SHA-512 ok)
verified nightly-mac.yml: flocafe-3.3.0-nightly.20260823-mac-arm64.zip (52 bytes, SHA-512 ok)
verified nightly-linux.yml: flocafe-3.3.0-nightly.20260823-linux-x64.appimage (57 bytes, SHA-512 ok)
verified nightly-linux-arm64.yml: flocafe-3.3.0-nightly.20260823-linux-arm64.appimage (59 bytes, SHA-512 ok)
release 3.3.0-nightly.20260823 channel nightly passed draft asset verification
[
  {
    "channel": "latest",
    "version": "3.3.0",
    "manifests": [
      "latest.yml",
      "latest-mac.yml",
      "latest-linux.yml",
      "latest-linux-arm64.yml"
    ],
    "assets": 24,
    "sha512Checks": 5,
    "result": "verified draft"
  },
  {
    "channel": "beta",
    "version": "3.3.0-beta.1",
    "manifests": [
      "beta.yml",
      "beta-mac.yml",
      "beta-linux.yml",
      "beta-linux-arm64.yml"
    ],
    "assets": 24,
    "sha512Checks": 5,
    "result": "verified draft"
  },
  {
    "channel": "nightly",
    "version": "3.3.0-nightly.20260823",
    "manifests": [
      "nightly.yml",
      "nightly-mac.yml",
      "nightly-linux.yml",
      "nightly-linux-arm64.yml"
    ],
    "assets": 24,
    "sha512Checks": 5,
    "result": "verified draft"
  }
]
Evidence: Parsed release workflow model
{
  "triggers": {
    "tagPush": [
      "[0-9]*"
    ],
    "manualChannels": [
      "stable",
      "beta",
      "nightly"
    ],
    "manualRequiresExactTag": true,
    "manualPromotionDecision": false
  },
  "buildContract": {
    "releaseScriptsPublishNever": true,
    "linuxBuildPublishesNever": true,
    "macBuildPublishesNever": true,
    "windowsBuildPublishesNever": true
  },
  "channelManifests": {
    "stable": [
      "latest.yml",
      "latest-mac.yml",
      "latest-linux.yml",
      "latest-linux-arm64.yml"
    ],
    "beta": [
      "beta.yml",
      "beta-mac.yml",
      "beta-linux.yml",
      "beta-linux-arm64.yml"
    ],
    "nightly": [
      "nightly.yml",
      "nightly-mac.yml",
      "nightly-linux.yml",
      "nightly-linux-arm64.yml"
    ]
  },
  "releaseGate": {
    "createReleaseStepUsesDraft": true,
    "verifyNeedsAllPlatformJobs": [
      "create-release",
      "release-linux",
      "release-mac",
      "release-windows"
    ],
    "publishNeedsVerification": true,
    "publishRunsOnlyAfterSuccess": "needs.create-release.outputs.promotion_only != 'true' && needs.verify-release.result == 'success'"
  },
  "latestPromotion": {
    "normalPublishUsesTypedFalse": true,
    "explicitPromotionInput": "boolean",
    "promotionJobCondition": "needs.create-release.outputs.promotion_only == 'true'",
    "promotionUsesTypedTrue": true
  }
}
Evidence: Artifact naming evidence
{
  "safeNamesAccepted": true,
  "unsafeNameRejected": true,
  "rejection": "::error::unsafe release artifact filename(s): FloCafe-3.3.0.AppImage"
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 errors
  • 🚨 .github/workflows/release.yml:725 - gh api -F converts false/true to JSON booleans, but GitHub's make_latest release parameter is a string enum. The publish job therefore sends the wrong type and can fail for every release before the draft is published. Use raw string fields (-f make_latest=false/true). See gh api field typing and GitHub release API.
  • 🚨 .github/workflows/release.yml:552 - For a beta/nightly version such as 3.3.0-beta.1, this computes 3.3.0-beta.1.0, which is not the numeric AppX version emitted by electron-builder (normally 3.3.0.0). The Windows verification step consequently rejects every prerelease channel. Derive the four-part Store version from the base semver instead. See electron-builder AppInfo version conversion.
  • 🚨 .github/workflows/release.yml:627 - This violates the required opt-in behavior: the intent says to “provide stable, beta, and nightly opt-in channels” and keep store-delivered packages outside electron-updater channel behavior, but the Windows Store publish step runs for every tag push and only adds a flight when an optional variable is set. A 3.3.0-beta.1 or nightly tag can therefore submit AppX to the production Store, exposing it to stable Store users. Gate prereleases to a required Store flight or skip AppX production publication for non-stable channels.
  • 🚨 scripts/verify-release-assets.cjs:121 - The verifier discovers ARM64 manifests only from assets already present, so a release containing latest-linux.yml and both x64/arm64 installers can pass without latest-linux-arm64.yml. Electron-updater selects the Linux channel filename with an architecture suffix for non-x64 builds, leaving ARM64 installs unable to update. Require the ARM64 manifest unconditionally and make the ARM64 upload step require that exact filename. See electron-updater channel-file selection.
  • ⚠️ scripts/verify-release-assets.cjs:217 - The post-upload gate verifies hashes but never checks a manifest's version against --tag, nor that referenced artifact names carry that version. A draft containing stale or mismatched versioned artifacts plus matching stale manifests can satisfy the extension-count inventory and publish without producing a usable update. Parse and require the expected version, and validate the exact current-release artifact inventory.
  • ⚠️ package.json:30 - Required criterion: “build platform artifacts with electron-builder --publish never and let the workflow own uploads and verification.” The existing release:linux, release:mac, and release:win entry points still invoke --publish always, providing a reachable path that bypasses the new draft/verification workflow. Confirm whether these scripts should be retired or converted to non-publishing build commands.
  • ⚠️ tests/release-config.test.ts:28 - The newly added assertions inspect implementation source text for function names and file existence instead of exercising the verifier behavior, so dead/commented code can satisfy them and behavior-preserving refactors can break them. Replace these checks with executable verifier scenarios or remove them.
  • ⚠️ tests/release-config.test.ts:178 - The newly added workflow checks read .github/workflows/release.yml as raw text and assert substrings/regexes across lines 171-309. This is the prohibited source-content-only pattern and does not prove GitHub Actions semantics. Parse the workflow into a semantic model and validate normalized jobs/steps, or exercise extracted workflow behavior where feasible.

🔧 Fix: Fixed release gating, asset verification, and semantic workflow tests
5 issues (3 errors, 2 warnings) still open:

  • 🚨 .github/workflows/release.yml:82 - Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” For every stable tag push, this sets PROMOTE=true, and the publish job then sends make_latest=true; the explicit promote_stable input is bypassed for tag pushes. Require an explicit promotion decision for push-triggered releases, or confirm this behavior is intentional.
  • 🚨 .github/workflows/release.yml:165 - Manual dispatch sets TAG to the package version, then creates the release without --verify-tag or --target. If that tag does not already exist, GitHub CLI can create it from the default branch while build jobs use the dispatched ref, allowing branch artifacts to be published under a different commit’s tag. Require an existing verified tag or explicitly target the workflow SHA.
  • 🚨 .github/workflows/release.yml:553 - For 3.3.0-beta.1 and 3.3.0-nightly.*, this derives AppX version 3.3.0.0, the same numeric version as stable 3.3.0 and other prereleases in that base series. Because prerelease AppX packages are submitted to Store flights, the Store may reject the duplicate/non-increasing package or fail to deliver it as an update. MSIX uses four-part numeric versions and update selection depends on version ordering (package-version rules, package flights). Choose a monotonic Store version scheme or explicitly skip nonstable AppX publication.
  • ⚠️ main/index.ts:80 - A nightly install is configured with autoUpdater.channel = nightly, but electron-updater’s GitHub provider does not fall back to stable releases when no nightly release exists. A nightly user can therefore receive “no published versions” instead of stable updates, despite the surrounding channel-transition documentation implying fallback behavior. Confirm whether nightly is intentionally isolated or implement an explicit stable fallback.
  • ⚠️ tests/release-config.test.ts:94 - The workflow tests parse YAML structure but still regex-match raw shell source in run fields. Commented, dead, or no-op commands could satisfy these assertions, so they do not prove workflow behavior and remain the source-content-only test pattern prohibited by the review rules. Validate a normalized executable workflow model or remove these assertions.

🔧 Fix: Removed raw shell-text matching from workflow tests
5 issues (4 errors, 1 warning) still open:

  • 🚨 .github/workflows/release.yml:521 - The Windows job defaults to PowerShell, where \ is not a line-continuation character. This command passes the backslash as an argument and leaves the -c.publish.channel line as a separate command, so the Windows build fails. Use PowerShell backticks, one line, or an explicit Bash shell.
  • 🚨 .github/workflows/release.yml:82 - Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” This unconditionally sets PROMOTE=true for every stable tag push, and the publish job then sets make_latest=true without an explicit promotion decision. Require explicit promotion for push-triggered releases or confirm this behavior is intentional.
  • 🚨 .github/workflows/release.yml:165 - Manual dispatch sets TAG to package.json’s version and creates the release without --verify-tag or --target. A dispatch from a branch can therefore create the tag from the default branch while build jobs package the dispatched ref, publishing artifacts under the wrong commit. Require an existing verified tag or explicitly target github.sha.
  • 🚨 .github/workflows/release.yml:553 - For 3.3.0-beta.1 and every later 3.3.0-beta.* or 3.3.0-nightly.*, this expects AppX version 3.3.0.0; successive Store submissions therefore reuse the same numeric version and may be rejected or fail to update flight users. MSIX updates require higher versions, and the Store reserves the fourth component (package version rules, update constraints). Choose a monotonic Store-version scheme or explicitly skip prerelease AppX publication.
  • ⚠️ main/index.ts:80 - A nightly install sets autoUpdater.channel = nightly, but electron-updater’s GitHub provider only selects Atom entries whose prerelease channel is nightly; when no nightly release exists, it throws ERR_UPDATER_NO_PUBLISHED_VERSIONS before its stable-manifest fallback can run. Confirm nightly is intentionally isolated, or implement an explicit stable fallback.

🔧 Fix: Fixed Windows PowerShell continuation in release build
5 issues (3 errors, 2 warnings) still open:

  • 🚨 .github/workflows/release.yml:82 - Required criterion: “make stable promotion to GitHub Latest explicit rather than automatic.” Lines 82-85 force PROMOTE=true for every stable tag push, so publication automatically promotes it. Require an explicit promotion decision or confirm tag pushes are intended to be that decision.
  • 🚨 .github/workflows/release.yml:58 - Workflow dispatch sets TAG to package.json’s version even when building an arbitrary branch, then creates the release without --verify-tag or --target. A branch dispatch can publish branch artifacts under a tag created from the default branch and bypass the tag-based concurrency group; require an existing verified tag or explicitly target the workflow SHA.
  • 🚨 .github/workflows/release.yml:553 - For 3.3.0-beta.1, 3.3.0-beta.2, and nightly variants, electron-builder’s AppX conversion produces the same 3.3.0.0 package version, which this gate expects at line 553. Successive Store submissions can be rejected or fail to update flight users; choose a monotonic four-part Store-version scheme or skip prerelease AppX publication. MSIX update requirements
  • ⚠️ scripts/verify-release-assets.cjs:252 - The post-upload verifier accepts any correctly hashed asset in each manifest. A release containing all expected assets can pass if latest.yml references a macOS ZIP, leaving Windows electron-updater without an .exe; similarly, Linux manifests need the correct AppImage/architecture entries. Validate manifest-to-platform, extension, and architecture mappings at this shared verification boundary.
  • ⚠️ main/index.ts:80 - A nightly install sets autoUpdater.channel = 'nightly'. The pinned electron-updater GitHub provider searches only for an exact nightly prerelease; when no nightly release exists, it throws ERR_UPDATER_NO_PUBLISHED_VERSIONS instead of selecting stable. Confirm that nightly is intentionally isolated, or define an explicit stable fallback.

🔧 Fix: Harden release promotion and manifest verification
2 errors still open:

  • 🚨 scripts/verify-release-assets.cjs:153 - electron-builder emits same-architecture deb/rpm entries into the Linux updater manifest, but this mapping allows only AppImage. Every release therefore fails verification at latest-linux*.yml and is never published. Allow the corresponding deb/rpm artifacts while keeping AppImage required.
  • 🚨 .github/workflows/release.yml:777 - The promotion-only dispatch checks only that the release is published and non-prerelease before setting make_latest=true; it does not prove the release passed asset verification. An incomplete manually published release with the exact tag can become GitHub Latest. Require a persisted verification proof or re-verify the published assets before promotion.
✅ **Test** - passed

✅ No issues found.

  • npm run test:release-config
  • Mocked GitHub API execution of scripts/verify-release-assets.cjs for stable, beta, and nightly draft releases
  • Parsed workflow semantic model covering draft gating, channel manifests, verification dependency, and explicit promotion
  • CLI fixture check for safe lowercase artifact names and rejection of unsafe names
  • git diff --check and final worktree diff inspection
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR introduces draft-first, channel-aware release publishing for stable, beta, and nightly builds, with standardized artifact names and post-upload verification.

  • Adds channel-specific updater configuration and manifests.
  • Moves artifact publication and verification into the release workflow.
  • Documents the release-channel and promotion process.

Confidence Score: 2/5

The PR is not safe to merge until normal Linux manifests can pass verification, GitHub release API fields use the required types, and stable promotion proves the selected release was verified.

The Linux manifest allowlist rejects package entries generated by the configured build, release publication still sends make_latest with an incompatible typed field, and promotion-only dispatches can make an independently published release Latest without passing the asset verifier.

Files Needing Attention: .github/workflows/release.yml and scripts/verify-release-assets.cjs

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds channel metadata, draft release creation, platform-owned uploads, verification gating, publication, and explicit stable promotion jobs.
scripts/verify-release-assets.cjs Adds release inventory, manifest mapping, version, availability, and SHA-512 validation.
main/index.ts Selects beta or nightly electron-updater channels from the installed prerelease version while excluding store builds.
package.json Changes platform release scripts to build with --publish never and adds release-verification commands.
tests/release-asset-verifier.test.cjs Adds mocked stable, beta, and nightly verifier scenarios.
tests/release-config.test.ts Adds structural checks for release scripts, updater configuration, artifact naming, and workflow behavior.
docs/release-process.md Documents channel naming, release verification, publication, and promotion procedures.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  T[Tag push or manual dispatch] --> M[Determine release metadata]
  M --> P{Promotion only?}
  P -- No --> D[Create draft release]
  D --> L[Build and upload Linux]
  D --> A[Build and upload macOS]
  D --> W[Build and upload Windows]
  L --> V[Verify uploaded assets]
  A --> V
  W --> V
  V --> R[Publish release]
  P -- Yes --> G[Promote published stable release to GitHub Latest]
Loading

Reviews (2): Last reviewed commit: "Merge branch 'main' into fm/flocafe-466-..." | Re-trigger Greptile

@khaira777
khaira777 merged commit 4e9209c into main Aug 23, 2026
13 checks passed
@khaira777
khaira777 deleted the fm/flocafe-466-release-channels branch August 23, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Draft-until-verified release flow (close the empty-release publish window)

1 participant