ワンクリックで
release
Build Electron app, bump version, and create GitHub release with all update artifacts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Build Electron app, bump version, and create GitHub release with all update artifacts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | release |
| description | Build Electron app, bump version, and create GitHub release with all update artifacts |
| invocation | release |
| examples | ["release","build and release","發佈","發佈新版本"] |
讀取 package.json 中的當前版號,詢問用戶要發佈的新版號(預設為 patch +1)。
更新以下兩處的版號:
package.json 的 version 欄位src/renderer/src/App.tsx 左下角的版號顯示文字git add package.json src/renderer/src/App.tsx
git commit -m "chore: bump version to <VERSION>"
⚠️ 一定要用
npm run build:mac/npm run build:win,不要直接呼叫npx electron-builder
build:mac會在打包前先用rebuild:native把 better-sqlite3 強制重編成 arm64。直接跑electron-builder會跳過這步,跨平台共用的node_modulesnative binary 可能是錯的架構(例如剛 build 完 Windows 留下的 x64 binary),打出來的 mac App 會無聲開不了視窗,這就是 issue #3
# macOS(會自動 rebuild:native → arm64,再打包)
npm run build:mac
# Windows(electron-builder 打包時會自動抓 better-sqlite3 的 Windows 預編版)
npm run build:win
等待 build 完成,確認 dist/ 下產生:
Orbit-Agents-<VERSION>-arm64.dmg, Orbit-Agents-<VERSION>-arm64.zipOrbit-Agents-Setup-<VERSION>.exe, Orbit-Agents-<VERSION>-x64-win.zip打包後務必驗證 mac 的 native binary 架構,避免 issue #3 重演:
file "dist/mac-arm64/Orbit Agents.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node"
# 預期輸出要包含:Mach-O 64-bit bundle arm64
使用專用 script 產生壓縮的 asar:
bun run prepare-asar
這會自動產生:
dist/app-asar-v<VERSION>.gz — gzip 壓縮的 asar 更新包計算 zip 和 dmg 的 sha512(base64 編碼),產生 YAML:
ZIP_SHA512=$(shasum -a 512 dist/Orbit-Agents-<VERSION>-arm64.zip | awk '{print $1}' | xxd -r -p | base64)
ZIP_SIZE=$(stat -f%z dist/Orbit-Agents-<VERSION>-arm64.zip)
DMG_SHA512=$(shasum -a 512 dist/Orbit-Agents-<VERSION>-arm64.dmg | awk '{print $1}' | xxd -r -p | base64)
DMG_SIZE=$(stat -f%z dist/Orbit-Agents-<VERSION>-arm64.dmg)
RELEASE_DATE=$(date -u "+%Y-%m-%dT%H:%M:%S.000Z")
格式:
version: <VERSION>
files:
- url: Orbit-Agents-<VERSION>-arm64.zip
sha512: <ZIP_SHA512>
size: <ZIP_SIZE>
- url: Orbit-Agents-<VERSION>-arm64.dmg
sha512: <DMG_SHA512>
size: <DMG_SIZE>
path: Orbit-Agents-<VERSION>-arm64.zip
sha512: <ZIP_SHA512>
releaseDate: '<RELEASE_DATE>'
計算 exe 的 sha512(base64 編碼),產生 YAML:
EXE_SHA512=$(shasum -a 512 dist/Orbit-Agents-Setup-<VERSION>.exe | awk '{print $1}' | xxd -r -p | base64)
EXE_SIZE=$(stat -f%z dist/Orbit-Agents-Setup-<VERSION>.exe)
RELEASE_DATE=$(date -u "+%Y-%m-%dT%H:%M:%S.000Z")
格式:
version: <VERSION>
files:
- url: Orbit-Agents-Setup-<VERSION>.exe
sha512: <EXE_SHA512>
size: <EXE_SIZE>
path: Orbit-Agents-Setup-<VERSION>.exe
sha512: <EXE_SHA512>
releaseDate: '<RELEASE_DATE>'
git push origin main
建立 release 並上傳所有檔案(共 7 個):
gh release create v<VERSION> \
dist/Orbit-Agents-<VERSION>-arm64.dmg \
dist/Orbit-Agents-<VERSION>-arm64.zip \
dist/Orbit-Agents-<VERSION>-x64-win.zip \
dist/Orbit-Agents-Setup-<VERSION>.exe \
dist/app-asar-v<VERSION>.gz \
dist/latest-mac.yml \
dist/latest.yml \
--title "v<VERSION>" \
--notes "<RELEASE_NOTES>"
Release notes 使用英文,格式參考:
## What's New
### Feature Category Name
- Description of change 1
- Description of change 2
### Another Category
- Description of change
撰寫原則:
git log <PREV_TAG>..HEAD --oneline 取得 commit 列表輸出:
每個 release 應包含以下 7 個檔案:
| 檔案 | 用途 |
|---|---|
Orbit-Agents-<VERSION>-arm64.dmg | macOS 安裝檔 |
Orbit-Agents-<VERSION>-arm64.zip | macOS zip |
Orbit-Agents-<VERSION>-x64-win.zip | Windows zip |
Orbit-Agents-Setup-<VERSION>.exe | Windows 安裝檔 |
app-asar-v<VERSION>.gz | gzip 壓縮的輕量更新包 |
latest-mac.yml | macOS auto-updater 資訊 |
latest.yml | Windows auto-updater 資訊 |