Skip to content

[codex] Add desktop release workflow#4

Merged
DragonnZhang merged 1 commit into
mainfrom
dragon/add-desktop-release-workflow
Jun 8, 2026
Merged

[codex] Add desktop release workflow#4
DragonnZhang merged 1 commit into
mainfrom
dragon/add-desktop-release-workflow

Conversation

@DragonnZhang

@DragonnZhang DragonnZhang commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Adds a manually triggered desktop release workflow that builds OpenWork installers for macOS, Windows, and Linux, uploads the generated installers as GitHub Actions artifacts, and can publish them to GitHub Releases when dry run mode is disabled.

The workflow now takes a desktop app version input, normalizes 0.0.2 or v0.0.2 into package version 0.0.2 and release tag v0.0.2, then fails before building if the source versions do not match the requested release version.

Why it's needed

OpenWork already has local Electron packaging commands, but there was no GitHub Actions path for producing cross-platform desktop installers or attaching them to the Release tab. This workflow gives maintainers a safe dry-run path first, then an explicit publish path for draft or public releases.

Keeping the app package version and Release tag aligned is also the base contract needed before wiring electron auto-update metadata later.

Reviewer Test Plan

How to verify

Run the Desktop Release workflow from GitHub Actions with a semver version that matches the source package versions. With the current source, use 0.0.1 or v0.0.1 and keep dry_run=true; confirm the version validation job passes, the macOS, Windows, and Linux build jobs complete, the Dry Run Summary lists generated assets, and no GitHub Release is created or updated.

To test a future 0.0.2 release, first update package.json, apps/electron/package.json, and packages/shared/package.json to 0.0.2; otherwise the workflow should fail before building. For release publishing, rerun with dry_run=false and draft=true, then confirm the draft release uses tag v0.0.2 and contains the uploaded installer assets.

Evidence (Before & After)

N/A. This is CI release automation, not a user-visible UI change.

Tested on

OS Status
🍏 macOS ✅ tested
🪟 Windows ⚠️ not tested
🐧 Linux ⚠️ not tested

Environment (optional)

Local checks on macOS:

  • bun run check-release-version --version 0.0.1
  • bun run check-release-version --version v0.0.1
  • bun run check-release-version --version 0.0.2 fails as expected while source versions are still 0.0.1
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/desktop-release.yml"); puts "YAML OK"'
  • go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/desktop-release.yml
  • git diff --check

Risk & Scope

  • Main risk or tradeoff: The first real installer build still needs to happen on GitHub-hosted macOS, Windows, and Linux runners because local validation only proves workflow syntax, version checks, and shell structure.
  • Not validated / out of scope: Code signing, notarization, Windows signing, and electron auto-update feed behavior are intentionally not enabled by this PR.
  • Breaking changes / migration notes: None.

Linked Issues

N/A

中文说明

What this PR does

新增一个手动触发的桌面端发布 workflow,可以为 OpenWork 构建 macOS、Windows、Linux 安装包,把生成的安装包上传为 GitHub Actions artifacts,并且在关闭 dry run 后把这些安装包发布到 GitHub Releases。

这个 workflow 现在使用桌面端 app version 输入,会把 0.0.2v0.0.2 统一成 package version 0.0.2 和 release tag v0.0.2。如果源码里的版本号和这次要发布的版本不一致,workflow 会在 build 前失败。

Why it's needed

OpenWork 已经有本地 Electron 打包命令,但之前没有 GitHub Actions 链路来生成跨平台桌面端安装包,也没有把安装包挂到 Release tab 的自动流程。这个 workflow 先提供安全的 dry run 路径,再提供明确的 draft 或公开发布路径。

保持 app package version 和 Release tag 一致,也是后续接 electron 自动更新 metadata 前必须有的基础约定。

Reviewer Test Plan

How to verify

在 GitHub Actions 里运行 Desktop Release workflow,输入和源码 package 版本一致的 semver。以当前源码为例,输入 0.0.1v0.0.1,保持 dry_run=true;确认版本校验 job 通过,macOS、Windows、Linux 构建 job 都完成,Dry Run Summary 能列出生成的资产,并确认没有创建或更新 GitHub Release。

如果要测试未来的 0.0.2 发布,需要先把 package.jsonapps/electron/package.jsonpackages/shared/package.json 都更新到 0.0.2;否则 workflow 应该会在 build 前失败。要验证 Release 上传时,用 dry_run=falsedraft=true 重新运行,然后确认 draft release 的 tag 是 v0.0.2,并且包含上传的安装包资产。

Evidence (Before & After)

N/A。这是 CI 发布自动化,不是用户可见 UI 改动。

Tested on

OS Status
🍏 macOS ✅ tested
🪟 Windows ⚠️ not tested
🐧 Linux ⚠️ not tested

Environment (optional)

macOS 本地检查:

  • bun run check-release-version --version 0.0.1
  • bun run check-release-version --version v0.0.1
  • bun run check-release-version --version 0.0.2 在源码仍是 0.0.1 时按预期失败
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/desktop-release.yml"); puts "YAML OK"'
  • go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/desktop-release.yml
  • git diff --check

Risk & Scope

  • Main risk or tradeoff: 第一次真实安装包构建仍然需要在 GitHub 托管的 macOS、Windows、Linux runner 上执行,因为本地校验只证明 workflow 语法、版本校验和 shell 结构是正确的。
  • Not validated / out of scope: 本 PR 不启用代码签名、公证、Windows 签名,也不处理 electron 自动更新 feed。
  • Breaking changes / migration notes: 无。

Linked Issues

N/A

@DragonnZhang DragonnZhang marked this pull request as ready for review June 8, 2026 08:47
@DragonnZhang DragonnZhang merged commit 0d14ab9 into main Jun 8, 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