This document describes how to create and publish a new release of the Automatic Chicken Feeder firmware.
- Git repository with clean working directory
- Node.js installed (for web build)
- Python 3 installed (for web-to-header conversion)
- PlatformIO installed
- Push access to the GitHub repository
make release VERSION=v2.1.0That's it! This single command will:
- ✅ Update
VERSIONfile with the version number - ✅ Update
web/package.jsonversion - ✅ Rebuild web interface with new version (embedded in firmware)
- ✅ Create a git commit with message "Release vX.X.X"
- ✅ Create a git tag
vX.X.X - ✅ Push to GitHub automatically
- ✅ Trigger GitHub Actions Release Build
Example Output:
🐔 Starting automated release v2.1.0...
📝 Step 1/5: Updating version files...
✅ Version files updated
🌐 Step 2/5: Building web interface with new version...
✅ Web interface built and embedded
📦 Step 3/5: Committing release...
✅ Release committed
🏷️ Step 4/5: Creating and pushing tag...
✅ Tag v2.1.0 created
🚀 Step 5/5: Pushing to GitHub...
📤 Pushing branch: v2.0
📤 Pushing tag: v2.1.0
✅ ✅ ✅ Release v2.1.0 completed! ✅ ✅ ✅
🔗 GitHub Actions: https://github.com/Friedjof/AutomaticChickenFeeder/actions
🔗 Releases: https://github.com/Friedjof/AutomaticChickenFeeder/releases
⏳ The release build will take ~5-10 minutes
📦 Artifacts: firmware-v2.1.0.bin, firmware-v2.1.0.elf
After pushing the tag:
- Go to: https://github.com/Friedjof/AutomaticChickenFeeder/actions
- Watch the "Release Build" workflow
- Wait for completion (~5-10 minutes)
Once the GitHub Action completes:
- Go to: https://github.com/Friedjof/AutomaticChickenFeeder/releases
- You should see the new release
vX.X.Xwith:firmware-vX.X.X.bin- Ready for OTA uploadfirmware-vX.X.X.elf- For debugging- Auto-generated release notes
The GitHub Action performs these steps:
- Checkout code at the tagged version
- Install dependencies (Node.js, Python, PlatformIO)
- Build web interface (Vite build)
- Convert to C headers (embedded in firmware)
- Build firmware for ESP32-C3
- Package binaries with version suffix
- Create GitHub Release with artifacts
- Use for: OTA updates via web interface
- How: Upload via http://192.168.4.1 → Maintenance → Firmware Update
- Size: ~500KB - 1MB (depending on features)
- Use for: Debugging with GDB
- How:
pio debug --environment esp32c3 - Contains: Symbols for crash analysis
The firmware uses min_spiffs.csv partition scheme:
- OTA_0: ~1.9MB (active firmware)
- OTA_1: ~1.9MB (update target)
- SPIFFS: Minimal (~64KB for NVS config)
This allows seamless OTA updates without USB cable.
Follow Semantic Versioning (semver):
vMAJOR.MINOR.PATCH
Examples:
v2.0.0- Major release (breaking changes)v2.1.0- Minor release (new features)v2.1.1- Patch release (bug fixes)
If a release has critical bugs:
-
Quick fix: Revert to previous tag
git revert <commit-hash> make release VERSION=v2.1.1 make release-push
-
Emergency: Users can manually flash older firmware
pio run -e esp32c3 -t upload
Check logs:
- Go to Actions tab
- Click failed workflow
- Expand failed step
Common issues:
- Web build fails: Check
web/package.jsonsyntax - Firmware too large: Remove debug symbols or optimize code
- Permission denied: Check repository settings → Actions → General → Workflow permissions
Verify tag was pushed:
git ls-remote --tags originShould show:
abc123... refs/tags/v2.1.0
If missing:
git push origin v2.1.0Delete local tag:
git tag -d v2.1.0Delete remote tag (DANGEROUS):
git push origin :refs/tags/v2.1.0Then re-run make release.
graph LR
A[make release] --> B[Local commit + tag]
B --> C[make release-push]
C --> D[GitHub receives tag]
D --> E[Workflow triggered]
E --> F[Build firmware]
F --> G[Create release]
G --> H[Upload artifacts]
-
Always test locally first:
make build make flash # Test all features -
Update CHANGELOG.md before release
-
Use descriptive commit messages:
- ✅ "Add OTA firmware update feature"
- ❌ "fix stuff"
-
Tag format: Always use
vprefix (e.g.,v2.1.0, not2.1.0) -
Pre-release testing:
- Test on actual hardware
- Verify OTA update works
- Check deep sleep behavior
- Confirm RTC scheduling
For critical production bugs:
# From main branch
git checkout -b hotfix/v2.0.1
# Fix the bug
git commit -m "Fix critical feeding bug"
make release VERSION=v2.0.1
make release-push
# Merge back
git checkout v2.0
git merge hotfix/v2.0.1
git push origin v2.0Before creating a release:
- All tests pass locally
- Web interface works in browser
- OTA update tested
- Deep sleep tested
- RTC scheduling verified
- Documentation updated
- CHANGELOG.md updated
- Version number decided
- Clean git status (
git status)
After release:
- GitHub Action completed successfully
- Release appears on GitHub
- Binaries downloadable
- Release notes look correct
- Test OTA update from release binary
For issues with releases:
- Open issue: https://github.com/Friedjof/AutomaticChickenFeeder/issues
- Check Actions logs: https://github.com/Friedjof/AutomaticChickenFeeder/actions
- Review release docs:
docs/RELEASE.md