1+ name : Manual Release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Release version (e.g., 2.0.1)'
8+ required : true
9+ type : string
10+ prerelease :
11+ description : ' Mark as pre-release'
12+ required : false
13+ default : false
14+ type : boolean
15+
16+ permissions :
17+ contents : write
18+
19+ jobs :
20+ manual-release :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0
28+
29+ - name : Set up Python
30+ uses : actions/setup-python@v4
31+ with :
32+ python-version : ' 3.9'
33+
34+ - name : Install PlatformIO
35+ run : |
36+ python -m pip install --upgrade pip
37+ pip install --upgrade platformio
38+
39+ - name : Update version in platformio.ini
40+ run : |
41+ sed -i 's/-DVERSION="[^"]*"/-DVERSION="${{ inputs.version }}"/' platformio.ini
42+ git config --local user.email "[email protected] " 43+ git config --local user.name "GitHub Action"
44+ git add platformio.ini
45+ git commit -m "chore: bump version to ${{ inputs.version }}"
46+ git push
47+
48+ - name : Build release firmware
49+ run : |
50+ echo "🔨 Building firmware for manual release v${{ inputs.version }}"
51+
52+ # Build ESP32dev environment
53+ echo "Building ESP32dev environment..."
54+ pio run --environment esp32dev
55+
56+ # Build Feather ESP32-S3 TFT environment
57+ echo "Building Feather ESP32-S3 TFT environment..."
58+ pio run --environment adafruit_feather_esp32s3_tft
59+
60+ # Verify firmware files exist
61+ echo "🔍 Verifying firmware files..."
62+
63+ ESP32_BIN=".pio/build/esp32dev/firmware.bin"
64+ ESP32_ELF=".pio/build/esp32dev/firmware.elf"
65+ FEATHER_BIN=".pio/build/adafruit_feather_esp32s3_tft/firmware.bin"
66+ FEATHER_ELF=".pio/build/adafruit_feather_esp32s3_tft/firmware.elf"
67+
68+ for file in "$ESP32_BIN" "$ESP32_ELF" "$FEATHER_BIN" "$FEATHER_ELF"; do
69+ if [ ! -f "$file" ]; then
70+ echo "❌ Required firmware file missing: $file"
71+ exit 1
72+ fi
73+ echo "✅ $file: $(ls -lh "$file" | awk '{print $5}')"
74+ done
75+
76+ - name : Generate release notes
77+ run : |
78+ BUILD_DATE=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
79+ cat > release_notes.md << EOF
80+ ## ESP32 WiFi Utility v${{ inputs.version }}
81+
82+ ### 🚀 Features
83+ - ✅ Enhanced WiFi scanning with visual indicators and signal quality analysis
84+ - ✅ Complete iPerf network performance testing (TCP/UDP client/server modes)
85+ - ✅ Access Point management with QR code generation for easy mobile connection
86+ - ✅ Interactive command interface with real-time feedback and status indicators
87+ - ✅ Comprehensive documentation and 17+ unit tests for quality assurance
88+
89+ ### 📊 Technical Specifications
90+ - **Flash Usage**: 61.4% (805KB) - Optimized for ESP32 with room for expansion
91+ - **RAM Usage**: 13.9% (45KB) - Efficient memory utilization
92+ - **Build System**: PlatformIO with automated CI/CD pipeline
93+ - **Testing**: Comprehensive unit test suite with hardware-in-loop validation
94+
95+ ### 🔧 Build Information
96+ - **Version**: ${{ inputs.version }}
97+ - **Commit**: ${{ github.sha }}
98+ - **Build Date**: ${BUILD_DATE}
99+ - **Workflow**: Manual Release
100+
101+ ### 📦 Installation Instructions
102+ 1. **Download**: Get the firmware binary file below
103+ 2. **Flash**: Use esptool, Arduino IDE, or your preferred ESP32 flashing method
104+ 3. **Connect**: Serial connection at 115200 baud rate
105+ 4. **Start**: Type \`help\` for complete command reference
106+
107+ ### 🎯 Quick Start Commands
108+ \`\`\`bash
109+ mode station # Switch to WiFi scanning mode
110+ scan now # Perform enhanced network scan with analysis
111+ scan info 1 # Get detailed info for specific network
112+ mode ap # Start access point with QR code
113+ iperf status # Check network performance testing status
114+ help # Show all available commands
115+ \`\`\`
116+
117+ ### 📚 Complete Documentation
118+ - [README.md](README.md) - Main project documentation
119+ - [ENHANCED_SCANNING.md](ENHANCED_SCANNING.md) - Advanced scanning features
120+ - [IPERF_GUIDE.md](IPERF_GUIDE.md) - Network performance testing
121+ - [GITHUB_ACTIONS.md](GITHUB_ACTIONS.md) - CI/CD pipeline documentation
122+
123+ **Manual release created for version ${{ inputs.version }}**
124+ EOF
125+
126+ - name : Create Release
127+ env :
128+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
129+ run : |
130+ TAG_NAME="v${{ inputs.version }}"
131+ RELEASE_NAME="ESP32 WiFi Utility v${{ inputs.version }}"
132+ PRERELEASE_FLAG=""
133+
134+ if [ "${{ inputs.prerelease }}" = "true" ]; then
135+ PRERELEASE_FLAG="--prerelease"
136+ else
137+ PRERELEASE_FLAG="--latest"
138+ fi
139+
140+ # Create release with firmware attachments for both boards
141+ gh release create "$TAG_NAME" \
142+ --title "$RELEASE_NAME" \
143+ --notes-file release_notes.md \
144+ $PRERELEASE_FLAG \
145+ .pio/build/esp32dev/firmware.bin#esp32-wifi-utility-esp32dev-v${{ inputs.version }}.bin \
146+ .pio/build/esp32dev/firmware.elf#esp32-wifi-utility-esp32dev-debug-v${{ inputs.version }}.elf \
147+ .pio/build/adafruit_feather_esp32s3_tft/firmware.bin#esp32-wifi-utility-feather-s3-tft-v${{ inputs.version }}.bin \
148+ .pio/build/adafruit_feather_esp32s3_tft/firmware.elf#esp32-wifi-utility-feather-s3-tft-debug-v${{ inputs.version }}.elf
149+
150+ echo "✅ Manual release created successfully: $TAG_NAME"
0 commit comments