-
-
Notifications
You must be signed in to change notification settings - Fork 0
247 lines (195 loc) · 11.1 KB
/
create-release.yml
File metadata and controls
247 lines (195 loc) · 11.1 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
name: Create Release
on:
push:
branches: [ main ]
paths:
- 'version'
permissions:
contents: write
pull-requests: write
issues: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if version file changed
id: check
run: |
if git diff HEAD~1 HEAD --name-only | grep -q "^version$"; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "Version file has changed"
else
echo "changed=false" >> $GITHUB_OUTPUT
echo "Version file has not changed"
fi
- name: Read version
id: version
if: steps.check.outputs.changed == 'true'
run: |
VERSION=$(cat version | tr -d '\n')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag_version=v$VERSION" >> $GITHUB_OUTPUT
echo "Creating release for version: $VERSION"
- name: Generate changelog
id: changelog
if: steps.check.outputs.changed == 'true'
run: |
VERSION="${{ steps.version.outputs.version }}"
# Create a comprehensive changelog based on recent commits and version
case "$VERSION" in
"2.0.0")
CHANGELOG=$(cat << 'EOF'
## 🎉 Pi HAT Screen v2.0.0 - Major Entertainment Update!
**This is a MASSIVE update that transforms Pi HAT Screen from a simple info display into an entertaining animated system monitor!**
### 🎬 **15 New Animations** (The Star Feature!)
**Anime & Gaming:**
- 🐱 **Kawaii Faces & Neko Cat Ears** - Adorable anime-style characters with blinking and tail wagging
- 💗 **Anime Hearts** - Floating hearts with sparkle effects
- ⚔️ **One Piece Luffy Fighting** - Epic battle scenes with Gomu Gomu attacks and victory poses
- 🎵 **Super Sonico** - Musical anime character with headphones and idol effects
- 👁️ **Seductive Eyes & Bouncing Curves** - Adult-themed provocative animations
**Tech & Visual Effects:**
- 🌧️ **Matrix Digital Rain** - Classic falling characters effect
- ⭐ **Starfield** - Space travel through stars
- 🌊 **Wave Interference** - Cool physics-based wave patterns
- 📊 **Animated Progress Bars** - System stats with growing bars and sparkles
- 🕐 **Analog Clock** - Real-time clock with moving hands
**Fun & Interactive:**
- ⚽ **Bouncing Ball** - Physics-based ball with trails
- 🌊 **Sine Wave Patterns** - Smooth mathematical wave animations
- 🚀 **GitHub Creator Signature** - Special developer credit animation
- 📈 **System Visualization** - Dynamic system monitoring displays
### 📺 **TV News Ticker Scrolling**
- **Synchronized Scrolling:** Both text lines move together perfectly (no more drift!)
- **Professional Speed:** Adjustable scrolling speed like real TV news tickers
- **Smooth Animation:** 0.15s refresh rate for fluid movement
- **Perfect Sync:** Fixed scroll cycle prevents desynchronization issues
### 🛡️ **Advanced Burn-in Prevention**
- **3-minute intervals:** Animations automatically run every 3 minutes
- **Random selection:** 15+ animations rotate randomly to prevent static images
- **80% brightness:** Optimized brightness to extend OLED lifespan
- **Smart timing:** Animations only run when needed, preserving system resources
### ⚙️ **Technical Improvements**
- **Optimized Performance:** Smooth 60+ FPS animations with efficient resource usage
- **Enhanced Error Handling:** Robust animation error recovery
- **Modular Design:** Each animation is a separate function for easy maintenance
- **Signal Handling:** Graceful shutdown with display clearing
- **Logging Integration:** Comprehensive logging for troubleshooting
### 📦 **Project Cleanup & Organization**
- **Simplified Structure:** Removed complex burn-in prevention files
- **Clean Repository:** Deleted outdated documentation and scripts
- **Modern README:** Complete rewrite with emojis and clear instructions
- **Service File:** Included systemd service file for easy installation
- **Version Management:** Proper semantic versioning system
### 🔄 **Installation & Setup**
- **One-command install:** Simple bash commands for complete setup
- **Service management:** Easy start/stop/status commands included
- **Troubleshooting guide:** Common issues and solutions documented
- **Hardware compatibility:** Works with all Raspberry Pi models with I2C
### 🎯 **What's Changed Since v1.0.0**
| Feature | v1.0.0 | v2.0.0 |
|---------|---------|---------|
| **Animations** | ❌ None | ✅ 15+ Different animations |
| **Scrolling** | ❌ Static text | ✅ TV news ticker style |
| **Burn-in Prevention** | ❌ Basic | ✅ Advanced with timing |
| **Entertainment** | ❌ Just info | ✅ Anime, gaming, visual effects |
| **Performance** | ⚠️ Basic | ✅ Optimized & smooth |
| **Documentation** | ⚠️ Technical | ✅ User-friendly with emojis |
| **Setup** | ⚠️ Manual | ✅ Automated with service file |
### 🎮 **Perfect For:**
- **Anime fans** who want kawaii characters on their Pi
- **Gamers** who love visual effects and animations
- **Developers** who appreciate the Matrix rain and GitHub signature
- **Anyone** who wants their system monitor to be entertaining!
### 🚀 **Quick Upgrade Guide**
```bash
cd Pi-HAT-Screen
git pull origin main
sudo systemctl restart info-screen.service
```
### 🙏 **Special Thanks**
This massive update was created to make system monitoring FUN and entertaining while maintaining all the practical functionality you need!
---
**Full Changelog**: [v1.0.0...v2.0.0](https://github.com/TheInfamousToTo/Pi-HAT-Screen/compare/v1.0.0...v2.0.0)
EOF
)
;;
"1.1.0")
CHANGELOG=$(cat << 'EOF'
## 🚀 Raspberry Pi OLED System Info Display v1.1.0 - Enhanced Monitoring
This release introduces enhanced system monitoring capabilities and improved display functionality for Raspberry Pi devices.
### ✨ New Features
- **📊 Comprehensive System Monitoring**: Real-time display of IP Address, CPU Usage, CPU Temperature, RAM Usage, and Current Time
- **🔄 Auto-Start Service**: Configured as systemd service for automatic startup on boot
- **⚡ Optimized Refresh Rate**: Updates every 5 seconds for real-time monitoring
- **🖥️ OLED Display Support**: Full support for 128x32 I2C OLED displays (SSD1306)
- **🐍 Virtual Environment**: Proper Python dependency management with isolated environment
- **🏗️ I2C Communication**: Reliable communication with I2C-based OLED displays
### 🔧 Technical Improvements
- **⚡ Performance Optimization**: Efficient system resource monitoring
- **🛡️ Error Handling**: Robust error handling and recovery mechanisms
- **📱 Display Optimization**: Optimized text rendering for 128x32 OLED screens
- **🔧 System Integration**: Seamless integration with Raspberry Pi GPIO and I2C
- **📊 Resource Management**: Efficient CPU and memory usage monitoring
### 🔌 Hardware Compatibility
- **🥧 Raspberry Pi Support**: Compatible with all Raspberry Pi models with I2C support
- **📺 OLED Display**: Supports 128x32 I2C OLED displays (SSD1306 chipset)
- **🔌 Simple Wiring**: Easy connection with standard jumper wires
- **⚡ Low Power**: Minimal power consumption for continuous operation
### 🔄 Installation & Setup
- **📦 Easy Installation**: Simple setup process with automated service configuration
- **🔧 Systemd Service**: Automatic startup and management as system service
- **🐍 Python Environment**: Isolated virtual environment for clean dependency management
- **📖 Documentation**: Comprehensive setup and installation guide
### 🛠️ Usage
**Quick Start:**
1. Connect your 128x32 I2C OLED display to your Raspberry Pi
2. Install the required dependencies
3. Configure the systemd service
4. Enjoy real-time system information on your OLED display!
### 🙏 Acknowledgments
This release provides a complete solution for real-time system monitoring on Raspberry Pi devices with OLED displays.
---
**Full Changelog**: [View all changes](https://github.com/TheInfamousToTo/Pi-HAT-INFO/compare/v1.0.0...v1.1.0)
EOF
)
;;
*)
# Generic changelog for other versions
CHANGELOG="## Release $VERSION
Automatically generated release from version file update.
See commit history for detailed changes.
**Full Changelog**: [View all changes](https://github.com/TheInfamousToTo/Pi-HAT-INFO/commits/$VERSION)"
;;
esac
# Save changelog to output (GitHub Actions multiline string)
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Check if tag exists
id: check-tag
if: steps.check.outputs.changed == 'true'
run: |
TAG_VERSION="${{ steps.version.outputs.tag_version }}"
if git tag -l | grep -q "^$TAG_VERSION$"; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Tag $TAG_VERSION already exists"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG_VERSION does not exist"
fi
- name: Create GitHub Release
if: steps.check.outputs.changed == 'true' && steps.check-tag.outputs.exists == 'false'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.tag_version }}
name: "Pi HAT INFO ${{ steps.version.outputs.tag_version }}"
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}