Skip to content

Comments

feat: Enable alpha release channel support#3182

Merged
jeanfbrito merged 3 commits intomasterfrom
test/electron-40-alpha-releases
Jan 26, 2026
Merged

feat: Enable alpha release channel support#3182
jeanfbrito merged 3 commits intomasterfrom
test/electron-40-alpha-releases

Conversation

@jeanfbrito
Copy link
Collaborator

@jeanfbrito jeanfbrito commented Jan 26, 2026

Summary

  • Add semver check to prevent showing "downgrades" as updates
  • Mark prerelease versions (alpha/beta) as prerelease on GitHub releases
  • Change development branch from develop to dev in workflows
  • Add scripts/release-tag.ts for creating release tags interactively
  • Add alpha release process documentation

Test plan

  • Verify lint passes
  • Verify tests pass
  • After merge, update version to 4.12.0-alpha.1 and test the alpha release workflow

Summary by CodeRabbit

  • Bug Fixes

    • Prevents accidental downgrades by blocking updates to older app versions.
  • Documentation

    • Added an Alpha Release Process guide covering channels, versioning, opt-in methods, and troubleshooting.
  • Chores

    • CI/CD workflows updated to use the new dev branch.
    • Improved release automation: automated tagging script and prerelease-aware release publishing.
    • Package version bumped for upcoming alpha release.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add semver check to prevent showing "downgrades" as updates
- Mark prerelease versions (alpha/beta) as prerelease on GitHub
- Change development branch from 'develop' to 'dev' in workflows
- Add release-tag.ts script for creating release tags
- Add alpha release process documentation
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Walkthrough

Branch triggers updated from develop to dev in CI; added a release-tag CLI script; prerelease flag wired into GitHub releases; added a downgrade guard to update handling; added alpha-release docs; added /scripts to .eslintignore.

Changes

Cohort / File(s) Summary
CI/CD Workflow Branch Updates
​.github/workflows/build-release.yml, ​.github/workflows/powershell-lint.yml, ​.github/workflows/pull-request-build.yml, ​.github/workflows/validate-pr.yml
Replaced develop with dev in push/pull_request triggers and branch detection/log messages.
Lint Configuration
.eslintignore
Added /scripts to ignore list with explanatory comments for utility scripts.
Release Automation Script
scripts/release-tag.ts
New CLI script: reads package.json version, validates SemVer, derives release channel, checks remote tags, prompts user, creates/pushes git tag, and optionally triggers workflows; includes robust error handling.
Update Safety
src/updates/main.ts
Added semver.gt downgrade guard in update-available handler; dispatches UPDATES_NEW_VERSION_NOT_AVAILABLE when incoming version is not greater.
Release Metadata Handling
workspaces/desktop-release-action/src/github.ts
Compute isPrerelease from SemVer prerelease field and pass prerelease flag to GitHub release create/update calls.
Development Branch Detection
workspaces/desktop-release-action/src/index.ts
Switched branch detection/logging from develop to dev in release action flow.
Docs: Alpha Release Process
docs/alpha-release-process.md
New documentation describing Alpha channel workflow, steps to create Alpha releases, opt-in/update behavior, versioning rules, and troubleshooting.
Metadata & Version Bumps
electron-builder.json, package.json
Incremented mac bundleVersion and bumped package version to 4.12.0-alpha.1; minor formatting changes in linux deb lists.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (local)
  participant Script as release-tag.ts
  participant Git as Git (local/remote)
  participant GH as GitHub (Actions & Releases)

  Dev->>Script: run release-tag.ts
  Script->>Script: read package.json, parse SemVer, determine channel
  Script->>Git: fetch remote tags
  Git-->>Script: remote tags list
  Script->>Script: check for existing tag & compare versions
  Script->>Dev: prompt confirm create & push tag
  Dev-->>Script: confirm
  Script->>Git: git tag & git push origin tag
  Git-->>Script: push success
  Script->>GH: pushed tag triggers Actions & Releases (prerelease set from SemVer)
  GH-->>Script: workflow & release responses
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

build-artifacts

Poem

🐰 I hopped through tags and versioned trails,

Pushed a tag that makes the CI sail,
Alpha notes and prerelease cheer,
Dev branch set, downgrade guards near,
I nibble bugs and nibble rails.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: Enable alpha release channel support' accurately captures the main objective of enabling alpha release functionality across multiple workflow and configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/electron-40-alpha-releases

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build-release.yml (1)

12-14: Concurrency group may not work correctly for push events.

github.head_ref is only populated for pull_request events. For push events (which this workflow triggers on), it will be empty, causing all push-triggered builds to potentially share the same concurrency group and cancel each other unexpectedly.

Consider using a fallback:

🔧 Suggested fix
 concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref }}
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
   cancel-in-progress: true
🤖 Fix all issues with AI agents
In `@scripts/release-tag.ts`:
- Around line 148-151: The git push command used in the push step is invalid
(`git push origin tag -- ${version.version}`); update the execSync call in
scripts/release-tag.ts (the block that logs "Pushing tag to origin..." and calls
execSync) to push the tag correctly by using `git push origin
${version.version}` or `git push origin refs/tags/${version.version}` so the tag
name is passed as the ref to push; keep the existing try/catch and stdio options
unchanged.
🧹 Nitpick comments (2)
.eslintignore (1)

4-6: Consider using a separate ESLint config for scripts instead of ignoring entirely.

While the rationale is clear (utility scripts with different patterns), completely ignoring /scripts from linting means type errors, unused variables, and other issues won't be caught. An alternative approach would be to create a separate .eslintrc in the /scripts directory with relaxed rules for the specific patterns (e.g., allowing console.log).

docs/alpha-release-process.md (1)

5-63: Add a simple flow diagram + architecture note for channel/update files.

The doc is clear, but it’s missing the required flow diagram and architecture explanation for the alpha-release mechanism (e.g., how alpha.yml/beta.yml/latest.yml map to channel selection and updater behavior). Consider adding a short Mermaid flow diagram and a brief “How it works” section. As per coding guidelines, please add these elements.

Use refs/tags/ prefix instead of invalid 'git push origin tag --' syntax.
- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0-alpha.1.
@jeanfbrito jeanfbrito merged commit 5f76d14 into master Jan 26, 2026
10 checks passed
@jeanfbrito jeanfbrito deleted the test/electron-40-alpha-releases branch January 26, 2026 14:30
This was referenced Jan 29, 2026
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.

1 participant