Publish Skill
Automates the complete release workflow for Markdown Preview Enhanced, including version bumping, CHANGELOG management, GitHub releases, Sparkle appcast updates, and Homebrew Cask distribution.
When to Use
- •Publishing a new version (major/minor/patch)
- •Creating GitHub releases with DMG artifacts
- •Updating Sparkle appcast.xml for auto-updates
- •Updating Homebrew Cask distribution
Quick Reference
Release Command
# Default: minor release make release # Or specify type make release [major|minor|patch]
Release Types:
- •
major: Breaking changes (1.8 → 2.0) - •
minor: New features (1.8 → 1.9) [DEFAULT] - •
patch: Bug fixes only (base version unchanged, commit count increments)
Workflow Overview
1. Pre-Release Preparation
Check CHANGELOG.md:
# Verify [Unreleased] section exists and has content grep -A 10 "## \[Unreleased\]" CHANGELOG.md
Update README.md if needed:
- •New user-facing features? Update feature list
- •New installation instructions? Update installation section
- •Screenshots outdated? Update screenshots
Commit README changes BEFORE running make release:
git add README.md git commit -m "docs(readme): update for v<NEXT_VERSION> features" git push origin master
2. Run Release Command
make release [major|minor|patch]
What this does automatically:
- •Calculates new version from
.version+ git commit count - •Updates
.versionfile (if major/minor) - •Transforms CHANGELOG.md (
[Unreleased]→ versioned section) - •Creates git commit and tag
- •Pushes to GitHub
- •Builds DMG artifact
- •Creates GitHub Release with DMG asset
3. Update Sparkle Appcast (Manual)
Required for auto-update functionality.
See references/sparkle.md for complete instructions.
Quick Steps:
# 1. Find sign_update tool
SIGN_UPDATE=$(find ~/Library/Developer/Xcode/DerivedData -name "sign_update" 2>/dev/null | head -1)
# 2. Sign DMG
SIGNATURE=$("$SIGN_UPDATE" build/artifacts/MarkdownPreviewEnhanced.dmg)
# 3. Extract signature and length
SPARKLE_SIGNATURE=$(echo "$SIGNATURE" | grep -o 'sparkle:edSignature="[^"]*"' | cut -d '"' -f 2)
DMG_LENGTH=$(echo "$SIGNATURE" | grep -o 'length="[^"]*"' | cut -d '"' -f 2)
# 4. Update appcast.xml with new <item> entry
# 5. Commit and push
git add appcast.xml
git commit -m "chore(sparkle): update appcast.xml for v<VERSION>"
git push origin master
4. Update Homebrew Cask (Manual)
Required for Homebrew distribution.
See references/homebrew.md for complete instructions.
Quick Steps:
# 1. Calculate SHA256
SHA256=$(shasum -a 256 build/artifacts/MarkdownPreviewEnhanced.dmg | awk '{print $1}')
# 2. Update Cask file
cd ../homebrew-tap
vim Casks/markdown-preview-enhanced.rb
# Update: version '...' and sha256 '...'
# 3. Commit and push
git add Casks/markdown-preview-enhanced.rb
git commit -m "chore(cask): update markdown-preview-enhanced to v<VERSION>"
git push origin master
cd -
5. Verification
GitHub Release:
gh release view v<VERSION>
Appcast XML:
curl -s https://xykong.github.io/markdown-quicklook/appcast.xml | grep "<VERSION>"
Homebrew Cask:
brew update brew info markdown-preview-enhanced # Expected: Version: <VERSION>
Local Installation Test:
brew uninstall --cask markdown-preview-enhanced brew install --cask markdown-preview-enhanced qlmanage -p tests/fixtures/test-sample.md
Success Criteria
All of the following must be true:
- •
.versionfile updated to new base version - • CHANGELOG.md transformed with new versioned section
- • Git commit and tag created and pushed
- • DMG built successfully
- • GitHub Release created with DMG asset
- • Appcast.xml updated and accessible
- • Homebrew Cask updated with correct version and SHA256
- • Local installation test passed
Detailed References
IMPORTANT: For detailed instructions, troubleshooting, and error handling, see:
- •Prerequisites - Required tools, repository state checks
- •Version Bump Process - How versioning works, CHANGELOG transformation
- •Sparkle Appcast - Signing DMG, updating appcast.xml
- •Homebrew Cask - Updating Cask formula, SHA256 calculation
- •Troubleshooting - Error handling, rollback procedures
Common Issues
"gh: command not found"
brew install gh gh auth login
"sign_update: No such file or directory"
# Build the project first make app
"Sparkle EdDSA Private Key not found in Keychain"
./scripts/generate-sparkle-keys.sh
Homebrew Installation Fails with "SHA256 mismatch"
Re-calculate SHA256 and update Cask file. See references/troubleshooting.md.
External Documentation
- •docs/RELEASE_PROCESS.md - Complete PR handling and release workflow
- •Keep a Changelog
- •Semantic Versioning
- •Sparkle Framework
- •Homebrew Cask Documentation