-
Notifications
You must be signed in to change notification settings - Fork 0
166 lines (145 loc) Β· 6.81 KB
/
release.yml
File metadata and controls
166 lines (145 loc) Β· 6.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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
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 Xcode
run: |
echo "π¨ Building ${{ env.APP_NAME }} with Xcode..."
# 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 xcode
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)"