重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
releasing-macos-apps by jamesrochabrun/skills
npx skills add https://github.com/jamesrochabrun/skills --skill releasing-macos-apps使用 Sparkle 自动更新、DMG 安装程序和 GitHub 发布功能,创建经过公证的 macOS 应用程序发布的完整工作流程。
复制此检查清单并跟踪进度:
Release Progress:
- [ ] 步骤 1:检查先决条件(证书、凭据)
- [ ] 步骤 2:更新 .xcconfig 文件中的版本号
- [ ] 步骤 3:构建并归档应用程序
- [ ] 步骤 4:使用正确的代码签名导出
- [ ] 步骤 5:创建 zip 文件并生成 Sparkle 签名
- [ ] 步骤 6:创建包含 Applications 文件夹的 DMG
- [ ] 步骤 7:提交进行公证
- [ ] 步骤 8:将公证票据附加到 DMG
- [ ] 步骤 9:使用新签名更新 appcast.xml
- [ ] 步骤 10:提交并推送更改
- [ ] 步骤 11:更新 GitHub 发布资源
- [ ] 步骤 12:验证 DMG 和版本号
开始发布前,请验证:
gh) 已安装并完成身份验证.xcconfig 文件)检查证书:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
security find-identity -v -p codesigning | grep "Developer ID Application"
找到您的版本配置文件(通常是 ProjectName.xcconfig 或 project.pbxproj)。
对于 .xcconfig 文件:
# 编辑 APP_VERSION 行
# 示例:APP_VERSION = 1.0.9
验证更新:
xcodebuild -project PROJECT.xcodeproj -showBuildSettings | grep MARKETING_VERSION
使用新版本归档应用程序:
xcodebuild -project PROJECT.xcodeproj \
-scheme SCHEME_NAME \
-configuration Release \
-archivePath ~/Desktop/APP-VERSION.xcarchive \
archive
验证归档是否创建成功:
ls -la ~/Desktop/APP-VERSION.xcarchive
创建导出选项文件:
cat > /tmp/ExportOptions.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>method</key>
<string>developer-id</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>signingCertificate</key>
<string>Developer ID Application</string>
</dict>
</plist>
EOF
将 YOUR_TEAM_ID 替换为您的实际团队 ID。
导出归档:
xcodebuild -exportArchive \
-archivePath ~/Desktop/APP-VERSION.xcarchive \
-exportPath ~/Desktop/APP-VERSION-Export \
-exportOptionsPlist /tmp/ExportOptions.plist
验证导出的应用程序版本:
defaults read ~/Desktop/APP-VERSION-Export/APP.app/Contents/Info.plist CFBundleShortVersionString
这应该显示新的版本号。
验证代码签名:
codesign -dvvv ~/Desktop/APP-VERSION-Export/APP.app
在 Authority 行中查找 "Developer ID Application"。
为 Sparkle 自动更新创建 zip 文件:
cd ~/Desktop/APP-VERSION-Export
ditto -c -k --keepParent APP.app APP.app.zip
生成 Sparkle EdDSA 签名(系统将提示您输入私钥):
echo "YOUR_SPARKLE_PRIVATE_KEY" | \
~/Library/Developer/Xcode/DerivedData/PROJECT-HASH/SourcePackages/artifacts/sparkle/Sparkle/bin/sign_update \
APP.app.zip --ed-key-file -
输出格式:
sparkle:edSignature="BASE64_SIGNATURE" length="FILE_SIZE"
保存签名和文件大小,用于更新 appcast.xml。
更多详细信息,请参阅 SPARKLE.md。
创建带有 Applications 文件夹符号链接的 DMG 安装程序,用于拖放安装:
TEMP_DMG_DIR="/tmp/APP_dmg" && \
rm -rf "${TEMP_DMG_DIR}" && \
mkdir -p "${TEMP_DMG_DIR}" && \
cp -R ~/Desktop/APP-VERSION-Export/APP.app "${TEMP_DMG_DIR}/" && \
ln -s /Applications "${TEMP_DMG_DIR}/Applications" && \
hdiutil create -volname "APP VERSION" \
-srcfolder "${TEMP_DMG_DIR}" \
-ov -format UDZO ~/Desktop/APP-VERSION.dmg && \
rm -rf "${TEMP_DMG_DIR}"
验证 DMG 内容:
hdiutil attach ~/Desktop/APP-VERSION.dmg -readonly -nobrowse -mountpoint /tmp/verify_dmg && \
ls -la /tmp/verify_dmg && \
hdiutil detach /tmp/verify_dmg
您应该能看到 APP.app 和 Applications(符号链接)。
将 DMG 提交给 Apple 进行公证(系统将提示您输入凭据):
xcrun notarytool submit ~/Desktop/APP-VERSION.dmg \
--apple-id YOUR_APPLE_ID@gmail.com \
--team-id YOUR_TEAM_ID \
--password YOUR_APP_SPECIFIC_PASSWORD \
--wait
--wait 标志使命令等待处理完成(通常需要 1-2 分钟)。
预期输出:
Processing complete
id: [submission-id]
status: Accepted
如果状态为 "Invalid",请获取详细日志:
xcrun notarytool log SUBMISSION_ID \
--apple-id YOUR_APPLE_ID@gmail.com \
--team-id YOUR_TEAM_ID \
--password YOUR_APP_SPECIFIC_PASSWORD
有关公证故障排除,请参阅 NOTARIZATION.md。
将公证票据附加到 DMG:
xcrun stapler staple ~/Desktop/APP-VERSION.dmg
预期输出:
The staple and validate action worked!
验证公证:
spctl -a -vvv ~/Desktop/APP-VERSION-Export/APP.app
应显示:
accepted
source=Notarized Developer ID
使用步骤 4 中的新版本、签名和文件大小更新 Sparkle appcast 文件:
<item>
<title>Version X.X.X</title>
<link>https://github.com/USER/REPO</link>
<sparkle:version>X.X.X</sparkle:version>
<sparkle:channel>stable</sparkle:channel>
<description><![CDATA[
Release version X.X.X
]]></description>
<pubDate>DAY, DD MMM YYYY HH:MM:SS -0700</pubDate>
<enclosure
url="https://github.com/USER/REPO/releases/download/vX.X.X/APP.app.zip"
sparkle:version="X.X.X"
sparkle:edSignature="SIGNATURE_FROM_STEP_4"
length="FILE_SIZE_FROM_STEP_4"
type="application/octet-stream" />
</item>
注意: gitleaks 预提交钩子可能会将 Sparkle 签名标记为潜在密钥。这是误报 - EdDSA 签名是公开的,可以安全提交。如果需要,请使用 git commit --no-verify。
提交版本更新和 appcast 更改:
git add PROJECT.xcconfig appcast.xml
git commit --no-verify -m "Bump version to X.X.X
Update appcast.xml with new version, Sparkle signature, and file size.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push
使用新资源创建或更新 GitHub 发布:
对于新发布:
gh release create vX.X.X \
--title "APP vX.X.X" \
--notes "Release version X.X.X" \
~/Desktop/APP-VERSION.dmg \
~/Desktop/APP-VERSION-Export/APP.app.zip
对于更新现有发布:
# 上传新资源(使用 --clobber 覆盖现有资源)
gh release upload vX.X.X \
~/Desktop/APP-VERSION.dmg \
~/Desktop/APP-VERSION-Export/APP.app.zip \
--clobber
关于资源命名的说明: 上传的文件名将成为资源名称。要以特定名称上传:
# 首先复制到所需名称
cp ~/Desktop/APP-1.0.9.dmg /tmp/APP.dmg
gh release upload vX.X.X /tmp/APP.dmg
验证发布资源:
gh release view vX.X.X --json assets -q '.assets[] | "\(.name) - \(.size) bytes"'
验证发布是否正常工作:
检查应用程序中的版本:
defaults read /Applications/APP.app/Contents/Info.plist CFBundleShortVersionString
应显示:X.X.X
测试 DMG:
测试 Sparkle 更新:
如果遇到问题,请参阅 TROUBLESHOOTING.md 获取以下问题的解决方案:
检查版本:
defaults read /path/to/APP.app/Contents/Info.plist CFBundleShortVersionString
检查代码签名:
codesign -dvvv /path/to/APP.app
检查公证:
spctl -a -vvv /path/to/APP.app
获取 Sparkle sign_update 路径:
find ~/Library/Developer/Xcode/DerivedData -name sign_update -type f
每周安装次数
72
仓库
GitHub 星标数
103
首次出现
2026年1月22日
安全审计
安装于
codex58
opencode58
gemini-cli56
claude-code56
cursor55
github-copilot51
Complete workflow for creating notarized macOS app releases with Sparkle auto-updates, DMG installers, and GitHub releases.
Copy this checklist and track progress:
Release Progress:
- [ ] Step 1: Check prerequisites (certificates, credentials)
- [ ] Step 2: Update version in .xcconfig file
- [ ] Step 3: Build and archive the app
- [ ] Step 4: Export with proper code signing
- [ ] Step 5: Create zip and generate Sparkle signature
- [ ] Step 6: Create DMG with Applications folder
- [ ] Step 7: Submit for notarization
- [ ] Step 8: Staple notarization ticket to DMG
- [ ] Step 9: Update appcast.xml with new signature
- [ ] Step 10: Commit and push changes
- [ ] Step 11: Update GitHub release assets
- [ ] Step 12: Verify DMG and version number
Before starting a release, verify:
gh) installed and authenticated.xcconfig file)Check certificate:
security find-identity -v -p codesigning | grep "Developer ID Application"
Locate your version configuration file (commonly ProjectName.xcconfig or project.pbxproj).
For .xcconfig files:
# Edit the APP_VERSION line
# Example: APP_VERSION = 1.0.9
Verify the update:
xcodebuild -project PROJECT.xcodeproj -showBuildSettings | grep MARKETING_VERSION
Archive the app with the new version:
xcodebuild -project PROJECT.xcodeproj \
-scheme SCHEME_NAME \
-configuration Release \
-archivePath ~/Desktop/APP-VERSION.xcarchive \
archive
Verify archive was created:
ls -la ~/Desktop/APP-VERSION.xcarchive
Create export options file:
cat > /tmp/ExportOptions.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>method</key>
<string>developer-id</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>signingCertificate</key>
<string>Developer ID Application</string>
</dict>
</plist>
EOF
Replace YOUR_TEAM_ID with your actual team ID.
Export the archive:
xcodebuild -exportArchive \
-archivePath ~/Desktop/APP-VERSION.xcarchive \
-exportPath ~/Desktop/APP-VERSION-Export \
-exportOptionsPlist /tmp/ExportOptions.plist
Verify the exported app version:
defaults read ~/Desktop/APP-VERSION-Export/APP.app/Contents/Info.plist CFBundleShortVersionString
This should show the new version number.
Verify code signing:
codesign -dvvv ~/Desktop/APP-VERSION-Export/APP.app
Look for "Developer ID Application" in the Authority lines.
Create zip file for Sparkle auto-updates:
cd ~/Desktop/APP-VERSION-Export
ditto -c -k --keepParent APP.app APP.app.zip
Generate Sparkle EdDSA signature (you'll be prompted for the private key):
echo "YOUR_SPARKLE_PRIVATE_KEY" | \
~/Library/Developer/Xcode/DerivedData/PROJECT-HASH/SourcePackages/artifacts/sparkle/Sparkle/bin/sign_update \
APP.app.zip --ed-key-file -
Output format:
sparkle:edSignature="BASE64_SIGNATURE" length="FILE_SIZE"
Save both the signature and length for updating appcast.xml.
For more details, see SPARKLE.md.
Create DMG installer with Applications folder symlink for drag-and-drop installation:
TEMP_DMG_DIR="/tmp/APP_dmg" && \
rm -rf "${TEMP_DMG_DIR}" && \
mkdir -p "${TEMP_DMG_DIR}" && \
cp -R ~/Desktop/APP-VERSION-Export/APP.app "${TEMP_DMG_DIR}/" && \
ln -s /Applications "${TEMP_DMG_DIR}/Applications" && \
hdiutil create -volname "APP VERSION" \
-srcfolder "${TEMP_DMG_DIR}" \
-ov -format UDZO ~/Desktop/APP-VERSION.dmg && \
rm -rf "${TEMP_DMG_DIR}"
Verify DMG contents:
hdiutil attach ~/Desktop/APP-VERSION.dmg -readonly -nobrowse -mountpoint /tmp/verify_dmg && \
ls -la /tmp/verify_dmg && \
hdiutil detach /tmp/verify_dmg
You should see both APP.app and Applications (symlink).
Submit the DMG to Apple for notarization (you'll be prompted for credentials):
xcrun notarytool submit ~/Desktop/APP-VERSION.dmg \
--apple-id YOUR_APPLE_ID@gmail.com \
--team-id YOUR_TEAM_ID \
--password YOUR_APP_SPECIFIC_PASSWORD \
--wait
The --wait flag makes the command wait for processing to complete (typically 1-2 minutes).
Expected output:
Processing complete
id: [submission-id]
status: Accepted
If status is "Invalid", get detailed logs:
xcrun notarytool log SUBMISSION_ID \
--apple-id YOUR_APPLE_ID@gmail.com \
--team-id YOUR_TEAM_ID \
--password YOUR_APP_SPECIFIC_PASSWORD
For notarization troubleshooting, see NOTARIZATION.md.
Staple the notarization ticket to the DMG:
xcrun stapler staple ~/Desktop/APP-VERSION.dmg
Expected output:
The staple and validate action worked!
Verify notarization:
spctl -a -vvv ~/Desktop/APP-VERSION-Export/APP.app
Should show:
accepted
source=Notarized Developer ID
Update the Sparkle appcast file with the new version, signature, and file size from Step 4:
<item>
<title>Version X.X.X</title>
<link>https://github.com/USER/REPO</link>
<sparkle:version>X.X.X</sparkle:version>
<sparkle:channel>stable</sparkle:channel>
<description><![CDATA[
Release version X.X.X
]]></description>
<pubDate>DAY, DD MMM YYYY HH:MM:SS -0700</pubDate>
<enclosure
url="https://github.com/USER/REPO/releases/download/vX.X.X/APP.app.zip"
sparkle:version="X.X.X"
sparkle:edSignature="SIGNATURE_FROM_STEP_4"
length="FILE_SIZE_FROM_STEP_4"
type="application/octet-stream" />
</item>
Note: The gitleaks pre-commit hook may flag the Sparkle signature as a potential secret. This is a false positive - the EdDSA signature is public and safe to commit. Use git commit --no-verify if needed.
Commit the version update and appcast changes:
git add PROJECT.xcconfig appcast.xml
git commit --no-verify -m "Bump version to X.X.X
Update appcast.xml with new version, Sparkle signature, and file size.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push
Create or update the GitHub release with new assets:
For new releases:
gh release create vX.X.X \
--title "APP vX.X.X" \
--notes "Release version X.X.X" \
~/Desktop/APP-VERSION.dmg \
~/Desktop/APP-VERSION-Export/APP.app.zip
For updating existing releases:
# Upload new assets (overwrites existing with --clobber)
gh release upload vX.X.X \
~/Desktop/APP-VERSION.dmg \
~/Desktop/APP-VERSION-Export/APP.app.zip \
--clobber
Note on asset naming: The uploaded filename becomes the asset name. To upload with a specific name:
# Copy to desired name first
cp ~/Desktop/APP-1.0.9.dmg /tmp/APP.dmg
gh release upload vX.X.X /tmp/APP.dmg
Verify release assets:
gh release view vX.X.X --json assets -q '.assets[] | "\(.name) - \(.size) bytes"'
Verify the release is working correctly:
Check version in app:
defaults read /Applications/APP.app/Contents/Info.plist CFBundleShortVersionString
Should show: X.X.X
Test DMG:
Test Sparkle updates:
If you encounter problems, see TROUBLESHOOTING.md for solutions to:
Check version:
defaults read /path/to/APP.app/Contents/Info.plist CFBundleShortVersionString
Check code signing:
codesign -dvvv /path/to/APP.app
Check notarization:
spctl -a -vvv /path/to/APP.app
Get Sparkle sign_update path:
find ~/Library/Developer/Xcode/DerivedData -name sign_update -type f
Weekly Installs
72
Repository
GitHub Stars
103
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
codex58
opencode58
gemini-cli56
claude-code56
cursor55
github-copilot51
GitHub Actions 官方文档查询助手 - 精准解答 CI/CD 工作流问题
47,200 周安装
Base技能包:bankrbot开源AI助手核心技能库,提升开发效率与代码质量
99 周安装
Yoink链上夺旗游戏:Base链智能合约交互指南与玩法规则
99 周安装
Godot MCP 场景构建器 - 高级智能体接口,从零构建 Godot 游戏场景
102 周安装
构建完整AI聊天应用指南:Next.js + Neon + AI SDK实现持久化聊天与自动命名
100 周安装
Deep Research:基于Google Gemini的AI深度研究工具,支持RAG文件上传与自动化报告生成
101 周安装
Gemini Web API 客户端 - 文本/图像生成与多轮对话逆向工程工具
102 周安装