- Check if tag exists before creating new one - Use existing tag and preserve custom messages - Force push tag in case it was updated - Update docs to recommend creating tag first
···4455## Local Release Script (Recommended)
6677-The easiest way to create a release is using the local `release.sh` script:
77+The easiest way to create a release is using the local `release.sh` script.
8899+**Option 1: Create tag first (recommended for custom tag messages)**
910```bash
1111+# Create a tag with a custom message
1212+git tag -a v1.0.0 -m "Version 1.0.0 - Your custom message"
1313+1414+# Run the release script (will use existing tag)
1515+./release.sh v1.0.0
1616+```
1717+1818+**Option 2: Let the script create the tag**
1919+```bash
2020+# Script will create a simple tag automatically
1021./release.sh v1.0.0
1122```
12231324This script will:
14251. Build the app with Developer ID signing
15262. Notarize the app with Apple
1616-3. Create a GitHub release with the signed .zip
1717-4. Calculate the SHA256 hash
1818-5. Automatically update the Homebrew cask
1919-6. Commit and push the cask update
2727+3. Use existing git tag or create one if needed
2828+4. Push the tag to GitHub
2929+5. Create a GitHub release with the signed .zip
3030+6. Calculate the SHA256 hash
3131+7. Automatically update the Homebrew cask
3232+8. Commit and push the cask update
20332134**Prerequisites:**
2235- `gh` CLI installed (`brew install gh`) and authenticated
···74874. Enter "GitHub Actions Notarization" as the name
75885. Copy the generated password and save it as APPLE_ID_PASSWORD in GitHub
76897777-## Creating a Release
9090+## Manual GitHub Actions Release (Alternative)
78917979-Once secrets are configured:
9292+If you prefer to use GitHub Actions instead of the local script:
80938194```bash
8295# Ensure you're on main branch with latest changes
···88101git push origin v1.0.0
89102```
901039191-The GitHub Actions workflow will automatically:
9292-- Build and sign the app
9393-- Notarize with Apple (takes 5-10 minutes)
9494-- Create a GitHub release with ZipMerge.zip
9595-- Include SHA256 hash in release notes
9696-9797-## Updating the Homebrew Cask
9898-9999-After the release completes:
100100-101101-1. Copy the SHA256 from the release notes
102102-2. Update `/Users/jsp/dev/projects/homebrew-tap/Casks/zipmerge.rb`:
103103- ```ruby
104104- sha256 "THE_SHA256_FROM_RELEASE_NOTES"
105105- ```
106106-3. Update version if needed
107107-4. Commit and push to homebrew-tap:
108108- ```bash
109109- cd /Users/jsp/dev/projects/homebrew-tap
110110- git add Casks/zipmerge.rb
111111- git commit -m "Update zipmerge to v1.0.0"
112112- git push
113113- ```
114114-115115-Users can then install with:
116116-```bash
117117-brew tap jaspermayone/tap
118118-brew install --cask zipmerge
119119-```
104104+The GitHub Actions workflow will automatically build, sign, notarize, and create a release. However, you'll need to manually update the Homebrew cask afterward (the local script does this automatically).
120105121106## Troubleshooting
122107
+12-4
release.sh
···124124SHA256=$(shasum -a 256 ZipMerge.zip | awk '{print $1}')
125125echo -e "SHA256: ${YELLOW}${SHA256}${NC}"
126126127127-# Create git tag
128128-echo -e "${GREEN}🏷️ Creating git tag...${NC}"
129129-git tag -a "$VERSION" -m "Release $VERSION" || echo "Tag already exists"
130130-git push origin "$VERSION" || echo "Tag already pushed"
127127+# Ensure git tag exists and is pushed
128128+echo -e "${GREEN}🏷️ Ensuring git tag exists...${NC}"
129129+if git rev-parse "$VERSION" >/dev/null 2>&1; then
130130+ echo "Tag $VERSION already exists locally"
131131+else
132132+ echo "Creating tag $VERSION"
133133+ git tag -a "$VERSION" -m "Release $VERSION"
134134+fi
135135+136136+# Push the tag (force in case it was updated)
137137+echo "Pushing tag to origin..."
138138+git push origin "$VERSION" 2>/dev/null || git push --force origin "$VERSION"
131139132140# Create GitHub release
133141echo -e "${GREEN}📤 Creating GitHub release...${NC}"