Agent Skills › brijr/gui › release

release

GitHub

用于签署、公证并发布 Gui macOS 及 Linux 构建版本,处理 Gatekeeper 调试和发布流程配置。

.cursor/skills/release/SKILL.md brijr/gui

触发场景

切割新版本发布 调试 Gatekeeper 或公证问题 修改 Electron-builder 或发布脚本

安装

npx skills add brijr/gui --skill release -g -y
更多选项

不安装直接使用

npx skills use brijr/gui@release

指定 Agent (Claude Code)

npx skills add brijr/gui --skill release -a claude-code -g -y

安装 repo 全部 skill

npx skills add brijr/gui --all -g -y

预览 repo 内 skill

npx skills add brijr/gui --list

SKILL.md

Frontmatter
{
    "name": "release",
    "description": "Sign, notarize, and publish a Gui macOS build, and the Linux build GitHub Actions makes from it. Use when cutting a version, debugging Gatekeeper, notarization or the Linux release workflow, or changing electron-builder \/ scripts\/release.sh \/ .github\/workflows\/release-linux.yml."
}

Release Gui

Do not publish from an agent session. Do not put certificates or notary passwords in the repo.

  1. Each version publishes once, tagged v<version>. If package.json's version is already tagged, the script bumps the last number and commits it (chore: release <version> [skip ci]); commit a version yourself to pick a different one. The bump commit and tag are pushed after the upload. An installed copy reads the feed of its own version's channel. An alpha (0.1.0-alpha.N) writes only alpha-mac.yml; a stable version writes latest-mac.yml and also alpha-mac.yml and beta-mac.yml (generateUpdatesFilesForAllChannels), so copies installed from an alpha update to it. A prerelease named anything else (rc) gets only its own feed, and no later release reaches it.
  2. Work on main, with a clean tree except www/ (the site is not packaged). The script fetches first and stops if origin/main has commits the local main lacks, because it ends by pushing main and the tag.
  3. Needs, once per Mac:
    • Developer ID Application in the login keychain (Xcode → Settings → Accounts → Manage Certificates), or CSC_LINK + CSC_KEY_PASSWORD (and CSC_NAME if several identities).
    • Notarization: keychain profile gui-notary (xcrun notarytool store-credentials), or APPLE_API_KEY + APPLE_API_KEY_ID + APPLE_API_ISSUER, or APPLE_ID + APPLE_APP_SPECIFIC_PASSWORD + APPLE_TEAM_ID.
    • Wrangler logged into the Cloudflare account that owns the gui-releases R2 bucket (cd www && bunx wrangler login).
    • gh signed in to GitHub (gh auth login), for the GitHub Release.
  4. Xcode 26+ actool compiles build/icon.icon. If Command Line Tools are selected, scripts/release.sh sets DEVELOPER_DIR to /Applications/Xcode.app/Contents/Developer.
  5. First run bun run smoke:agents (one real turn per installed agent, on your own agent usage) and look into any FAIL: an agent update may have broken Gui. Then run bun run release (scripts/release.sh). It runs bun run check, builds, then electron-builder --mac --publish never.
  6. CSC_IDENTITY_AUTO_DISCOVERY must stay unset for a signed build. Unsigned/ad-hoc builds (CSC_IDENTITY_AUTO_DISCOVERY=false bun run dist) get a new signature each time; macOS then re-prompts for the keychain item and the preview stays blank until that is answered.
  7. After the build: scripts/check-packaged-app.sh imports each agent adapter and each module the main process imports from the packaged node_modules (add a new adapter or main-process dependency to its list), codesign --verify --deep --strict on Gui.app, staple the DMG, confirm release/$channel-mac.yml exists. The script refuses to publish if any of that fails.
  8. Uploads: the zip first. Then the blockmap and the DMG, as Gui-<version>-arm64.dmg and Gui-<channel>-arm64.dmg; a stable release also as Gui-arm64.dmg, which usegui.com/download serves in place of the alpha's once it exists. Every release/*-mac.yml goes last and is read back from the site before anything is tagged.
  9. Before running it, add the release to the top of www/src/changelog.ts (the site's /changelog): the version the script will release, today's date, and a few plain bullets of what a user would notice. The script stops before building if that entry is missing, and after pushing the tag it creates a GitHub Release with those bullets as its notes (--prerelease for alphas). Deploy the site (cd www && bun run deploy) so /changelog shows it.
  10. CI release-dry-run only packs when CSC_LINK is set; without secrets it checks electron-builder.yml and that scripts/release.sh parses.

Linux

The Linux build is made in GitHub Actions from the tag, by .github/workflows/release-linux.yml; nothing runs on the Mac.

  1. The GitHub Release that scripts/release.sh creates last starts it. On ubuntu-24.04 (x64) and ubuntu-24.04-arm (arm64), each build job checks that package.json at the tag has the tag's version, runs bun run check, builds with GUI_OFFICIAL_BUILD=1 (as release.sh does) and packages an AppImage and a .deb (electron-builder --linux; node-pty compiles on the runner). Then scripts/check-packaged-app.sh imports each adapter and main-process module from release/linux-unpacked (linux-arm64-unpacked), and scripts/check-launch.ts starts the AppImage under xvfb, waits for its window to load and quits it with SIGTERM, which must end it with exit code 0. A failed check stops the run before anything is uploaded.
  2. One publish job then attests build provenance for the AppImages and .debs, writes SHA256SUMS, and runs scripts/publish-linux.sh. It refuses a version that usegui.com/releases/<channel>-mac.yml doesn't name: Linux follows the Mac's newest release on its channel, so re-running an old tag can't roll anyone back. It uploads Gui-<version>-x86_64.AppImage, Gui-<version>-arm64.AppImage, Gui-<version>-amd64.deb and Gui-<version>-arm64.deb, checks that the site answers a Range request with 206, uploads the copies /download/<file> serves (Gui-<channel>-x86_64.AppImage and so on; a stable release also Gui-x86_64.AppImage and so on), and uploads the feeds <channel>-linux.yml (x64) and <channel>-linux-arm64.yml last, reading them back from the site. Last, it attaches the AppImages, .debs and SHA256SUMS to the GitHub Release.
  3. Repository secrets, read only by the publish step: R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY and CLOUDFLARE_ACCOUNT_ID (the account in www/wrangler.jsonc). The first two come from one Cloudflare account API token limited to the gui-releases bucket, with R2 object read and write: the access key is the token's id and the secret is the SHA-256 (hex) of the token's value. scripts/publish-linux.sh uploads with curl through R2's S3 API; Wrangler won't take a token limited to one bucket.
  4. To run it again, re-run the failed jobs in Actions (same workflow file), or gh workflow run release-linux.yml -f tag=v<version>, which uses main's workflow file to build the tag. Uploads overwrite what an earlier run put there.
  5. The AppImage updates itself from the Linux feeds. A .deb install never checks; Check for Updates tells the user to download the new version (src/main/updates.ts). On Linux, usegui.com/download is the download page for the browser's processor (www/src/pages/download/[page].astro), whose links are the worker's /download/<file>. Deploy the site with that page only once a Linux build is in the bucket.

Human review before changing this path.

版本历史

  • eecbbe2 当前 2026-11-19 21:09

同 Skill 集合

.cursor/skills/e2e-motion/SKILL.md

元信息

文件数
0
版本
eecbbe2
Hash
b868a492
收录时间
2026-11-19 21:09

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-19 23:43
浙ICP备14020137号-1