Merge pull request #5 from jsonify:feature/remove-sparkle #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π Build and Release ClickIt | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags like v1.3.0 | |
| workflow_dispatch: # Allow manual triggering | |
| inputs: | |
| tag: | |
| description: 'Tag to build (e.g., v1.3.0)' | |
| required: true | |
| type: string | |
| # Required permissions for GitHub Actions | |
| permissions: | |
| contents: write | |
| packages: read | |
| env: | |
| APP_NAME: "ClickIt" | |
| BUNDLE_ID: "com.jsonify.clickit" | |
| jobs: | |
| build-and-release: | |
| name: π¨ Build Universal App & Create Release | |
| runs-on: macos-15 | |
| steps: | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for proper tagging | |
| - name: π Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: π Extract Version from Tag | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| TAG_NAME="${{ github.event.inputs.tag }}" | |
| else | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| fi | |
| VERSION=${TAG_NAME#v} # Remove 'v' prefix | |
| echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "π¦ Building version: ${VERSION} (tag: ${TAG_NAME})" | |
| - name: π§ Update Version in Build Script | |
| run: | | |
| sed -i '' "s/VERSION=\"1.0.0\"/VERSION=\"${{ steps.version.outputs.version }}\"/" build_app_unified.sh | |
| echo "β Updated version to ${{ steps.version.outputs.version }}" | |
| - name: ποΈ Build Universal App with SPM | |
| run: | | |
| echo "π¨ Building ${{ env.APP_NAME }} with Swift Package Manager..." | |
| # Set environment variables for CI build (disable code signing, fix deployment target) | |
| export CODE_SIGN_IDENTITY="" | |
| export CODE_SIGNING_REQUIRED=NO | |
| export CODE_SIGNING_ALLOWED=NO | |
| export MACOSX_DEPLOYMENT_TARGET=14.0 | |
| ./build_app_unified.sh release spm | |
| echo "π¦ Creating release archive..." | |
| cd dist | |
| zip -r ${{ env.APP_NAME }}.app.zip ${{ env.APP_NAME }}.app | |
| cd .. | |
| echo "π Build completed successfully!" | |
| ls -la dist/ | |
| - name: π Verify Build | |
| run: | | |
| echo "π Verifying app bundle..." | |
| if [ -d "dist/${{ env.APP_NAME }}.app" ]; then | |
| echo "β App bundle created successfully" | |
| ls -la "dist/${{ env.APP_NAME }}.app/Contents/" | |
| # Check if binary exists and get architecture info | |
| if [ -f "dist/${{ env.APP_NAME }}.app/Contents/MacOS/${{ env.APP_NAME }}" ]; then | |
| echo "π± Binary architecture:" | |
| file "dist/${{ env.APP_NAME }}.app/Contents/MacOS/${{ env.APP_NAME }}" | |
| fi | |
| else | |
| echo "β App bundle not found!" | |
| exit 1 | |
| fi | |
| if [ -f "dist/${{ env.APP_NAME }}.app.zip" ]; then | |
| echo "β Archive created successfully" | |
| ls -lh "dist/${{ env.APP_NAME }}.app.zip" | |
| else | |
| echo "β Archive not found!" | |
| exit 1 | |
| fi | |
| - name: π Generate Release Notes | |
| id: release_notes | |
| run: | | |
| TAG_NAME="${{ steps.version.outputs.tag }}" | |
| VERSION="${{ steps.version.outputs.version }}" | |
| # Get the previous tag for changelog | |
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") | |
| echo "# ${{ env.APP_NAME }} ${TAG_NAME}" > release_notes.md | |
| echo "" >> release_notes.md | |
| echo "π **Native macOS Auto-Clicker Application**" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## β¨ Features" >> release_notes.md | |
| echo "- π±οΈ **Precision Clicking**: Sub-10ms timing accuracy" >> release_notes.md | |
| echo "- π **Universal Binary**: Native support for Intel x64 + Apple Silicon" >> release_notes.md | |
| echo "- π― **Background Operation**: Works without requiring app focus" >> release_notes.md | |
| echo "- β‘ **Global Hotkeys**: ESC key controls for instant stop" >> release_notes.md | |
| echo "- π§ **Advanced Configuration**: CPS rates, click types, and presets" >> release_notes.md | |
| echo "- ποΈ **Visual Feedback**: Real-time overlay indicators" >> release_notes.md | |
| echo "- π **Auto-Updates**: Built-in Sparkle framework integration" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## π System Requirements" >> release_notes.md | |
| echo "- **macOS**: 14.0 or later" >> release_notes.md | |
| echo "- **Architecture**: Universal Binary (Intel x64 + Apple Silicon)" >> release_notes.md | |
| echo "- **Permissions**: Accessibility and Screen Recording access required" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## π Installation" >> release_notes.md | |
| echo "1. Download \`${{ env.APP_NAME }}.app.zip\` below" >> release_notes.md | |
| echo "2. Extract and move \`${{ env.APP_NAME }}.app\` to Applications folder" >> release_notes.md | |
| echo "3. First launch: Right-click β Open (to bypass Gatekeeper)" >> release_notes.md | |
| echo "4. Grant Accessibility and Screen Recording permissions when prompted" >> release_notes.md | |
| echo "" >> release_notes.md | |
| if [ -n "$PREVIOUS_TAG" ]; then | |
| echo "## π Changes Since ${PREVIOUS_TAG}" >> release_notes.md | |
| echo "\`\`\`" >> release_notes.md | |
| git log --oneline ${PREVIOUS_TAG}..HEAD --pretty=format:"- %s" >> release_notes.md || echo "- Initial release" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "\`\`\`" >> release_notes.md | |
| echo "" >> release_notes.md | |
| fi | |
| echo "---" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "ποΈ **Built with**: Xcode on GitHub Actions" >> release_notes.md | |
| echo "π **Build Date**: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> release_notes.md | |
| echo "π **Version**: ${VERSION}" >> release_notes.md | |
| echo "π― **Target**: macOS 14.0+" >> release_notes.md | |
| echo "release_notes_file=release_notes.md" >> $GITHUB_OUTPUT | |
| - name: π Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: "${{ env.APP_NAME }} ${{ steps.version.outputs.tag }}" | |
| body_path: release_notes.md | |
| draft: false | |
| prerelease: false | |
| files: | | |
| dist/${{ env.APP_NAME }}.app.zip | |
| dist/build-info.txt | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: β Release Complete | |
| run: | | |
| echo "π Release ${{ steps.version.outputs.tag }} completed successfully!" | |
| echo "π Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.tag }}" | |
| echo "π¦ Assets uploaded:" | |
| echo " - ${{ env.APP_NAME }}.app.zip (Universal macOS App)" | |
| echo " - build-info.txt (Build metadata)" |