@alteriom/painlessmesh 1.6.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +380 -143
  2. package/LICENSE +674 -674
  3. package/README.md +477 -434
  4. package/RELEASE_GUIDE.md +504 -418
  5. package/docs/DOCUMENTATION_MIGRATION_PLAN.md +175 -175
  6. package/docs/IMPLEMENTATION_PLAN_MESH_TOPOLOGY.md +1062 -0
  7. package/docs/MESH_TOPOLOGY_GUIDE.md +992 -0
  8. package/docs/MESH_TOPOLOGY_PROGRESS.md +422 -0
  9. package/docs/MQTT_BRIDGE_COMMANDS.md +894 -0
  10. package/docs/MQTT_BRIDGE_IMPLEMENTATION_SUMMARY.md +324 -0
  11. package/docs/MQTT_COMMAND_SCHEMA_PROPOSAL.md +576 -0
  12. package/docs/MQTT_SCHEMA_COMPLIANCE.md +285 -0
  13. package/docs/MQTT_SCHEMA_PROPOSALS.md +446 -0
  14. package/docs/MQTT_SCHEMA_REVIEW.md +690 -0
  15. package/docs/OTA_COMMANDS_REFERENCE.md +554 -0
  16. package/docs/PHASE1_GUIDE.md +349 -0
  17. package/docs/PHASE2_GUIDE.md +543 -0
  18. package/docs/README.md +77 -70
  19. package/docs/SCHEMA_VALIDATION_CHECKLIST.md +222 -0
  20. package/docs/alteriom/overview.md +507 -507
  21. package/docs/api/core-api.md +606 -606
  22. package/docs/architecture/mesh-architecture.md +378 -378
  23. package/docs/architecture/plugin-system.md +516 -516
  24. package/docs/getting-started/first-mesh.md +409 -409
  25. package/docs/getting-started/installation.md +274 -274
  26. package/docs/getting-started/quickstart.md +157 -157
  27. package/docs/improvements/FEATURE_PROPOSALS.md +337 -0
  28. package/docs/improvements/PHASE1_IMPLEMENTATION.md +325 -0
  29. package/docs/improvements/PHASE2_IMPLEMENTATION.md +567 -0
  30. package/docs/improvements/README.md +86 -68
  31. package/docs/improvements/ota-and-status-enhancements.md +911 -0
  32. package/docs/improvements/ota-status-architecture-diagrams.md +658 -0
  33. package/docs/improvements/ota-status-quick-reference.md +284 -0
  34. package/docs/platformio-publishing.md +255 -0
  35. package/docs/platformio-setup-summary.md +121 -0
  36. package/docs/troubleshooting/common-issues.md +520 -520
  37. package/docs/troubleshooting/faq.md +472 -472
  38. package/docs/tutorials/basic-examples.md +717 -717
  39. package/docs/wiki/API-Reference.md +245 -245
  40. package/docs/wiki/Complete-Documentation.md +122 -122
  41. package/examples/alteriom/README.md +139 -81
  42. package/examples/alteriom/alteriom.ino +186 -185
  43. package/examples/alteriom/alteriom_sensor_package.hpp +240 -127
  44. package/examples/alteriom/platformio.ini +24 -24
  45. package/examples/alteriomImproved/alteriom_sensor_package.hpp +224 -0
  46. package/examples/{alteriom → alteriomImproved}/improved_sensor_node.ino +245 -245
  47. package/examples/alteriomImproved/platformio.ini +25 -0
  48. package/examples/alteriomPhase1/alteriom_sensor_package.hpp +224 -0
  49. package/examples/alteriomPhase1/phase1_features.ino +242 -0
  50. package/examples/alteriomPhase1/platformio.ini +25 -0
  51. package/examples/alteriomPhase2/alteriom_sensor_package.hpp +224 -0
  52. package/examples/alteriomPhase2/phase2_features.ino +186 -0
  53. package/examples/alteriomPhase2/platformio.ini +25 -0
  54. package/examples/{alteriom → alteriomSensorNode}/alteriom_sensor_node.ino +183 -183
  55. package/examples/alteriomSensorNode/alteriom_sensor_package.hpp +224 -0
  56. package/examples/alteriomSensorNode/platformio.ini +25 -0
  57. package/examples/basic/basic.ino +66 -66
  58. package/examples/basic/platformio.ini +25 -25
  59. package/examples/bridge/bridge.ino +51 -51
  60. package/examples/bridge/mesh_event_publisher.hpp +253 -0
  61. package/examples/bridge/mesh_topology_reporter.hpp +303 -0
  62. package/examples/bridge/mqtt_command_bridge.hpp +459 -0
  63. package/examples/bridge/mqtt_status_bridge.hpp +519 -0
  64. package/examples/bridge/platformio.ini +25 -25
  65. package/examples/echoNode/echoNode.ino +33 -33
  66. package/examples/echoNode/platformio.ini +25 -25
  67. package/examples/logClient/logClient.ino +109 -109
  68. package/examples/logClient/platformio.ini +25 -25
  69. package/examples/logServer/logServer.ino +81 -81
  70. package/examples/logServer/platformio.ini +25 -25
  71. package/examples/meshCommandNode/alteriom_sensor_package.hpp +235 -0
  72. package/examples/meshCommandNode/meshCommandNode.ino +263 -0
  73. package/examples/meshCommandNode/platformio.ini +25 -0
  74. package/examples/mqttBridge/mqttBridge.ino +118 -118
  75. package/examples/mqttBridge/platformio.ini +26 -26
  76. package/examples/mqttCommandBridge/alteriom_sensor_package.hpp +235 -0
  77. package/examples/mqttCommandBridge/mesh_event_publisher.hpp +253 -0
  78. package/examples/mqttCommandBridge/mesh_topology_reporter.hpp +303 -0
  79. package/examples/mqttCommandBridge/mqttCommandBridge.ino +252 -0
  80. package/examples/mqttCommandBridge/mqtt_command_bridge.hpp +459 -0
  81. package/examples/mqttCommandBridge/platformio.ini +26 -0
  82. package/examples/mqttStatusBridge/mqttStatusBridge.ino +216 -0
  83. package/examples/mqttStatusBridge/mqtt_status_bridge.hpp +522 -0
  84. package/examples/mqttStatusBridge/platformio.ini +26 -0
  85. package/examples/mqttTopologyTest/README.md +467 -0
  86. package/examples/mqttTopologyTest/mqttTopologyTest.ino +748 -0
  87. package/examples/mqttTopologyTest/platformio.ini +26 -0
  88. package/examples/namedMesh/namedMesh.ino +97 -97
  89. package/examples/namedMesh/platformio.ini +25 -25
  90. package/examples/otaReceiver/otaReceiver.ino +79 -79
  91. package/examples/otaReceiver/platformio.ini +25 -25
  92. package/examples/otaSender/otaSender.ino +160 -151
  93. package/examples/otaSender/platformio.ini +25 -25
  94. package/examples/startHere/platformio.ini +25 -25
  95. package/examples/startHere/startHere.ino +159 -159
  96. package/examples/webServer/platformio.ini +27 -27
  97. package/examples/webServer/webServer.ino +89 -89
  98. package/keywords.txt +48 -48
  99. package/library.json +55 -34
  100. package/library.properties +10 -10
  101. package/package.json +86 -78
  102. package/src/AlteriomPainlessMesh.h +97 -97
  103. package/src/arduino/wifi.hpp +365 -365
  104. package/src/boost/asynctcp.hpp +279 -279
  105. package/src/painlessMesh.h +70 -70
  106. package/src/painlessMeshSTA.cpp +236 -236
  107. package/src/painlessMeshSTA.h +58 -58
  108. package/src/painlessTaskOptions.h +4 -4
  109. package/src/painlessmesh/base64.hpp +111 -111
  110. package/src/painlessmesh/buffer.hpp +229 -229
  111. package/src/painlessmesh/callback.hpp +91 -91
  112. package/src/painlessmesh/configuration.hpp +77 -77
  113. package/src/painlessmesh/connection.hpp +192 -192
  114. package/src/painlessmesh/layout.hpp +188 -188
  115. package/src/painlessmesh/logger.hpp +158 -158
  116. package/src/painlessmesh/memory.hpp +119 -119
  117. package/src/painlessmesh/mesh.hpp +761 -560
  118. package/src/painlessmesh/metrics.hpp +322 -322
  119. package/src/painlessmesh/ntp.hpp +263 -263
  120. package/src/painlessmesh/ota.hpp +582 -553
  121. package/src/painlessmesh/plugin.hpp +188 -188
  122. package/src/painlessmesh/protocol.hpp +813 -813
  123. package/src/painlessmesh/router.hpp +322 -322
  124. package/src/painlessmesh/tcp.hpp +71 -71
  125. package/src/painlessmesh/validation.hpp +238 -238
  126. package/src/plugin/performance.hpp +214 -214
  127. package/src/plugin/remote.hpp +64 -64
  128. package/src/scheduler.cpp +10 -10
  129. package/src/wifi.cpp +2 -2
package/RELEASE_GUIDE.md CHANGED
@@ -1,419 +1,505 @@
1
- # painlessMesh Release Guide
2
-
3
- This document provides comprehensive instructions for releasing new versions of the Alteriom painlessMesh library across all distribution channels.
4
-
5
- ## 🚀 Quick Release Process
6
-
7
- ### Standard Release (Recommended)
8
-
9
- ```bash
10
- # 1. Update version using the bump script
11
- ./scripts/bump-version.sh patch # or minor, major
12
-
13
- # 2. Update CHANGELOG.md with your changes
14
- # Add your changes under the new version section
15
-
16
- # 3. Commit and trigger release
17
- git add library.properties library.json package.json CHANGELOG.md
18
- git commit -m "release: v1.6.1"
19
- git push origin main
20
- ```
21
-
22
- **That's it!** GitHub Actions will automatically handle:
23
- - ✅ Comprehensive testing across platforms
24
- - ✅ Git tag creation and GitHub release
25
- - ✅ NPM publishing (public + GitHub Packages)
26
- - ✅ GitHub Wiki synchronization
27
- - ✅ Arduino Library Manager package preparation
28
- - ✅ Release notes generation from changelog
29
-
30
- ## 📋 Distribution Channels
31
-
32
- ### Automatic (Zero Manual Work Required)
33
- 1. **GitHub Releases** - Created with changelog and downloadable packages
34
- 2. **NPM Public Registry** - Published to https://www.npmjs.com/package/@alteriom/painlessmesh
35
- 3. **GitHub Packages** - Published to GitHub's NPM registry (@alteriom/painlessmesh)
36
- 4. **PlatformIO Registry** - Automatically indexed from GitHub releases
37
- 5. **GitHub Wiki** - Documentation synchronized from repository
38
-
39
- ### Semi-Automatic (One-Time Manual Submission)
40
- 6. **Arduino Library Manager** - Submit once, then automatically indexed
41
-
42
- ## 🎯 Detailed Process
43
-
44
- ### Version Management
45
-
46
- **File Consistency**: All three files must have matching versions:
47
-
48
- ```properties
49
- # library.properties
50
- version=1.6.1
51
- ```
52
-
53
- ```json
54
- // library.json
55
- {
56
- "version": "1.6.1"
57
- }
58
- ```
59
-
60
- ```json
61
- // package.json
62
- {
63
- "version": "1.6.1"
64
- }
65
- ```
66
-
67
- **Semantic Versioning**: Follow [semver.org](https://semver.org/):
68
- - **MAJOR**: Breaking changes (e.g., 1.6.0 → 2.0.0)
69
- - **MINOR**: New features, backward compatible (e.g., 1.6.0 → 1.7.0)
70
- - **PATCH**: Bug fixes, backward compatible (e.g., 1.6.0 → 1.6.1)
71
-
72
- ### Automation Triggers
73
-
74
- The release workflow triggers on commits to `main` that:
75
- 1. Modify `library.properties`, `library.json`, `package.json`, or `CHANGELOG.md`
76
- 2. Have a commit message starting with `release:`
77
-
78
- ### What Gets Automated
79
-
80
- #### Testing Pipeline
81
- - **Desktop builds**: gcc & clang with strict warnings
82
- - **Arduino CLI**: ESP32 & ESP8266 compilation
83
- - **PlatformIO**: Cross-platform build validation
84
- - **Code quality**: Formatting and lint checks
85
-
86
- #### Release Artifacts
87
- - **Git tag**: `v1.6.1` format
88
- - **GitHub Release**: With changelog excerpt
89
- - **Library package**: `painlessMesh-v1.6.1.zip`
90
- - **Documentation**: Auto-deployed to GitHub Pages
91
-
92
- #### NPM Publishing
93
- - **Public NPM**: Available to anyone via `npm install @alteriom/painlessmesh`
94
- - **GitHub Packages**: Scoped package for authenticated users
95
- - **Version consistency**: Verified across all package files
96
-
97
- #### Wiki Updates
98
- - **Home Page**: Generated from README.md
99
- - **API Reference**: Auto-generated documentation
100
- - **Examples**: Links to repository examples
101
- - **Installation Guide**: Multi-platform instructions
102
-
103
- ## 📦 NPM Publishing Details
104
-
105
- ### Dual Publishing Strategy
106
-
107
- Each release publishes to **two NPM registries**:
108
-
109
- 1. **Public NPM** (npmjs.com)
110
- - Package: `@alteriom/painlessmesh`
111
- - Installation: `npm install @alteriom/painlessmesh`
112
- - No authentication required
113
-
114
- 2. **GitHub Packages** (npm.pkg.github.com)
115
- - Package: `@alteriom/painlessmesh`
116
- - Installation: Requires `.npmrc` configuration
117
- - Authentication required for installation
118
-
119
- ### NPM Package Contents
120
-
121
- The NPM package includes:
122
- - `src/` - Complete library source code
123
- - `examples/` - All Arduino examples
124
- - `docs/` - Documentation files
125
- - `library.properties` - Arduino metadata
126
- - `library.json` - PlatformIO metadata
127
- - Core documentation files (README, LICENSE, CHANGELOG)
128
-
129
- Excluded from NPM package:
130
- - Development files (`.github/`, `test/`, `scripts/`)
131
- - Build artifacts (`bin/`, `build/`)
132
- - IDE files and OS-specific files
133
-
134
- ## 🛠️ Arduino Library Manager
135
-
136
- ### One-Time Submission Process
137
-
138
- After your first release, submit to Arduino Library Manager:
139
-
140
- 1. **Go to**: https://github.com/arduino/library-registry
141
- 2. **Create issue** with this template:
142
-
143
- ```
144
- Title: Add painlessMesh library
145
-
146
- Repository URL: https://github.com/Alteriom/painlessMesh
147
- Release tag: v1.6.1
148
- Library name: painlessMesh
149
- Version: 1.6.1
150
-
151
- This is the Alteriom fork of the painlessMesh library with enhanced
152
- CI/CD, automated releases, and improved Arduino Library Manager compatibility.
153
- Includes SensorPackage, CommandPackage, and StatusPackage extensions.
154
- ```
155
-
156
- 3. **Monitor** the issue for Arduino team approval
157
- 4. **Future releases** are automatically indexed
158
-
159
- ### Arduino Library Compliance
160
-
161
- The library meets all Arduino Library Manager requirements:
162
- - Correct directory structure
163
- - Valid `library.properties` file
164
- - ✅ Source files in `src/` directory
165
- - Examples compile successfully
166
- - ✅ Consistent version numbering
167
- - Open source license (LGPL-3.0)
168
-
169
- ## 📚 GitHub Wiki Management
170
-
171
- ### Automatic Synchronization
172
-
173
- Wiki pages are automatically updated on each release:
174
-
175
- - **Home** - From README.md
176
- - **Release-Guide** - From RELEASE_GUIDE.md
177
- - **Changelog** - From CHANGELOG.md
178
- - **API-Reference** - Generated documentation
179
- - **Examples** - Auto-generated from examples directory
180
- - **Installation** - Multi-platform installation guide
181
- - **Contributing** - From CONTRIBUTING.md
182
-
183
- ### Manual Wiki Updates
184
-
185
- If you need to update the wiki manually:
186
-
187
- ```bash
188
- # Clone wiki repository
189
- git clone https://github.com/Alteriom/painlessMesh.wiki.git
190
-
191
- # Edit markdown files directly
192
- # Commit and push changes
193
- ```
194
-
195
- Note: Manual changes may be overwritten by automatic synchronization.
196
-
197
- ## 🔧 Scripts Reference
198
-
199
- ### `./scripts/bump-version.sh`
200
- Updates version in all library files with consistency checks.
201
-
202
- **Usage:**
203
- ```bash
204
- ./scripts/bump-version.sh patch # Increment patch version
205
- ./scripts/bump-version.sh minor # Increment minor version
206
- ./scripts/bump-version.sh major # Increment major version
207
- ./scripts/bump-version.sh patch 1.6.2 # Set specific version
208
- ```
209
-
210
- ### `./scripts/validate-release.sh`
211
- Comprehensive pre-release validation.
212
-
213
- **Checks:**
214
- - Version consistency between all files
215
- - Changelog entries for current version
216
- - Git working tree status
217
- - Tag existence validation
218
- - Dependency declarations
219
- - Build file presence
220
- - Quick compilation test
221
-
222
- ## 🚨 Troubleshooting
223
-
224
- ### Common Issues
225
-
226
- **Version Mismatch Error**
227
- ```bash
228
- # Fix version inconsistencies
229
- ./scripts/bump-version.sh patch 1.6.2 # Force set version
230
- ```
231
-
232
- **Missing Changelog Entry**
233
- ```bash
234
- # Add changelog entry for current version
235
- vim CHANGELOG.md
236
- # Add section: ## [1.6.2] - YYYY-MM-DD
237
- ```
238
-
239
- **Build Failures**
240
- ```bash
241
- # Test locally before release
242
- npm run build
243
- npm run test
244
- ```
245
-
246
- **NPM Token Invalid**
247
- ```bash
248
- # Verify NPM authentication
249
- npm whoami
250
- # If not logged in: npm login
251
- ```
252
-
253
- **GitHub Packages Authentication**
254
- ```bash
255
- # Check if GITHUB_TOKEN has packages:write permission
256
- # Repository Settings Actions → General → Permissions
257
- ```
258
-
259
- **Wiki Update Failure**
260
- ```bash
261
- # Wiki may need manual initialization
262
- # Go to: https://github.com/Alteriom/painlessMesh/wiki
263
- # Create any page to initialize, then re-run release
264
- ```
265
-
266
- ### Manual Override
267
-
268
- If automation fails, you can manually perform any step:
269
-
270
- ```bash
271
- # Manual NPM publish
272
- npm publish --access public
273
-
274
- # Manual GitHub release
275
- gh release create v1.6.2 --title "painlessMesh v1.6.2" --notes-file CHANGELOG.md
276
-
277
- # Manual tag creation
278
- git tag v1.6.2
279
- git push origin v1.6.2
280
- ```
281
-
282
- ## 🔍 Validation Commands
283
-
284
- ### Pre-Release Checks
285
- ```bash
286
- # Comprehensive validation
287
- ./scripts/validate-release.sh
288
-
289
- # Version consistency check
290
- ./scripts/bump-version.sh --verify || echo "Use proper arguments"
291
-
292
- # NPM package validation
293
- npm run validate-library
294
-
295
- # Build test
296
- npm run build && npm run test
297
- ```
298
-
299
- ### Post-Release Verification
300
- ```bash
301
- # Check NPM publication
302
- npm view @alteriom/painlessmesh
303
-
304
- # Check GitHub Packages
305
- npm view @alteriom/painlessmesh --registry=https://npm.pkg.github.com
306
-
307
- # Verify GitHub release
308
- gh release view
309
-
310
- # Check wiki update
311
- curl -s https://github.com/Alteriom/painlessMesh/wiki | grep -q "v1.6.2"
312
- ```
313
-
314
- ## 🎉 Success Indicators
315
-
316
- ### Successful Release Shows:
317
- - GitHub release created with changelog
318
- - ✅ Git tag pushed to repository
319
- - ✅ NPM package published (check npmjs.com)
320
- - ✅ GitHub Packages updated
321
- - ✅ Wiki pages synchronized
322
- - All GitHub Actions workflows completed successfully
323
-
324
- ### Distribution Verification:
325
- ```bash
326
- # Public NPM
327
- npm view @alteriom/painlessmesh
328
-
329
- # GitHub Packages
330
- npm view @alteriom/painlessmesh --registry=https://npm.pkg.github.com
331
-
332
- # PlatformIO (updated within 24 hours)
333
- # Check: https://registry.platformio.org/libraries/alteriom/painlessMesh
334
-
335
- # Arduino Library Manager (after manual submission)
336
- # Search in Arduino IDE Library Manager
337
- ```
338
-
339
- ## 🌟 Advanced Topics
340
-
341
- ### Custom Release Notes
342
-
343
- To customize release notes beyond the changelog:
344
-
345
- 1. Edit the generated `release_notes.txt` in the workflow
346
- 2. Or create a custom release notes file in `.github/release-template.md`
347
-
348
- ### Environment-Specific Releases
349
-
350
- For testing releases:
351
-
352
- ```bash
353
- # Use pre-release tags
354
- git tag v1.6.2-beta
355
- git push origin v1.6.2-beta
356
-
357
- # This creates a pre-release without full publication
358
- ```
359
-
360
- ### Rollback Procedure
361
-
362
- If a release has issues:
363
-
364
- ```bash
365
- # Delete remote tag
366
- git push origin :refs/tags/v1.6.2
367
-
368
- # Delete local tag
369
- git tag -d v1.6.2
370
-
371
- # Delete GitHub release
372
- gh release delete v1.6.2
373
-
374
- # Unpublish NPM package (contact npm support)
375
- # GitHub Packages: Delete from package settings
376
- ```
377
-
378
- ## 📊 Release Metrics
379
-
380
- Monitor your releases:
381
- - **GitHub**: https://github.com/Alteriom/painlessMesh/releases
382
- - **NPM**: https://www.npmjs.com/package/@alteriom/painlessmesh
383
- - **PlatformIO**: https://registry.platformio.org/libraries/alteriom/painlessMesh
384
- - **Wiki**: https://github.com/Alteriom/painlessMesh/wiki
385
-
386
- ## 🤝 Security & Permissions
387
-
388
- ### Required GitHub Secrets
389
- - `GITHUB_TOKEN`: Automatically provided by GitHub Actions
390
- - `NPM_TOKEN`: Required for NPM publishing (add in repository secrets)
391
-
392
- ### Repository Settings
393
- - **Actions**: Enabled with write permissions
394
- - **Packages**: Enabled for GitHub Packages publication
395
- - **Wiki**: Enabled for documentation deployment
396
- - **Releases**: Public releases enabled
397
-
398
- ---
399
-
400
- ## Quick Reference
401
-
402
- **Release a patch version:**
403
- ```bash
404
- ./scripts/bump-version.sh patch
405
- # Edit CHANGELOG.md
406
- git add . && git commit -m "release: v1.6.2" && git push
407
- ```
408
-
409
- **Check release status:**
410
- ```bash
411
- ./scripts/validate-release.sh
412
- ```
413
-
414
- **Monitor release:**
415
- - GitHub Actions: https://github.com/Alteriom/painlessMesh/actions
416
- - Releases: https://github.com/Alteriom/painlessMesh/releases
417
- - Documentation: https://github.com/Alteriom/painlessMesh/wiki
418
-
1
+ # painlessMesh Release Guide
2
+
3
+ This document provides comprehensive instructions for releasing new versions of the Alteriom painlessMesh library across all distribution channels.
4
+
5
+ ## 🚀 Quick Release Process
6
+
7
+ ### Standard Release (Recommended)
8
+
9
+ ```bash
10
+ # 1. Update version using the bump script
11
+ ./scripts/bump-version.sh patch # or minor, major
12
+
13
+ # 2. Update CHANGELOG.md with your changes
14
+ # Add your changes under the new version section
15
+
16
+ # 3. Commit and trigger release
17
+ git add library.properties library.json package.json CHANGELOG.md
18
+ git commit -m "release: v1.6.1"
19
+ git push origin main
20
+ ```
21
+
22
+ **That's it!** GitHub Actions will automatically handle:
23
+ - ✅ Comprehensive testing across platforms
24
+ - ✅ Git tag creation and GitHub release
25
+ - ✅ NPM publishing (public + GitHub Packages)
26
+ - ✅ **PlatformIO Library Registry publishing**
27
+ - ✅ GitHub Wiki synchronization
28
+ - ✅ Arduino Library Manager package preparation
29
+ - ✅ Release notes generation from changelog
30
+
31
+ ## 📋 Distribution Channels
32
+
33
+ ### Automatic (Zero Manual Work Required)
34
+
35
+ 1. **GitHub Releases** - Created with changelog and downloadable packages
36
+ 2. **NPM Public Registry** - Published to <https://www.npmjs.com/package/@alteriom/painlessmesh>
37
+ 3. **GitHub Packages** - Published to GitHub's NPM registry (@alteriom/painlessmesh)
38
+ 4. **PlatformIO Registry** - Automatically published via GitHub Actions workflow
39
+ 5. **GitHub Wiki** - Documentation synchronized from repository
40
+
41
+ ### Semi-Automatic (One-Time Manual Submission)
42
+
43
+ 1. **Arduino Library Manager** - Submit once, then automatically indexed
44
+
45
+ ## 🎯 Detailed Process
46
+
47
+ ### Version Management
48
+
49
+ **File Consistency**: All three files must have matching versions:
50
+
51
+ ```properties
52
+ # library.properties
53
+ version=1.6.1
54
+ ```
55
+
56
+ ```json
57
+ // library.json
58
+ {
59
+ "version": "1.6.1"
60
+ }
61
+ ```
62
+
63
+ ```json
64
+ // package.json
65
+ {
66
+ "version": "1.6.1"
67
+ }
68
+ ```
69
+
70
+ **Semantic Versioning**: Follow [semver.org](https://semver.org/):
71
+ - **MAJOR**: Breaking changes (e.g., 1.6.0 → 2.0.0)
72
+ - **MINOR**: New features, backward compatible (e.g., 1.6.0 → 1.7.0)
73
+ - **PATCH**: Bug fixes, backward compatible (e.g., 1.6.0 → 1.6.1)
74
+
75
+ ### Automation Triggers
76
+
77
+ The release workflow triggers on commits to `main` that:
78
+ 1. Modify `library.properties`, `library.json`, `package.json`, or `CHANGELOG.md`
79
+ 2. Have a commit message starting with `release:`
80
+
81
+ ### What Gets Automated
82
+
83
+ #### Testing Pipeline
84
+ - **Desktop builds**: gcc & clang with strict warnings
85
+ - **Arduino CLI**: ESP32 & ESP8266 compilation
86
+ - **PlatformIO**: Cross-platform build validation
87
+ - **Code quality**: Formatting and lint checks
88
+
89
+ #### Release Artifacts
90
+ - **Git tag**: `v1.6.1` format
91
+ - **GitHub Release**: With changelog excerpt
92
+ - **Library package**: `painlessMesh-v1.6.1.zip`
93
+ - **Documentation**: Auto-deployed to GitHub Pages
94
+
95
+ #### NPM Publishing
96
+ - **Public NPM**: Available to anyone via `npm install @alteriom/painlessmesh`
97
+ - **GitHub Packages**: Scoped package for authenticated users
98
+ - **Version consistency**: Verified across all package files
99
+
100
+ #### Wiki Updates
101
+ - **Home Page**: Generated from README.md
102
+ - **API Reference**: Auto-generated documentation
103
+ - **Examples**: Links to repository examples
104
+ - **Installation Guide**: Multi-platform instructions
105
+
106
+ ## 📦 NPM Publishing Details
107
+
108
+ ### Dual Publishing Strategy
109
+
110
+ Each release publishes to **two NPM registries**:
111
+
112
+ 1. **Public NPM** (npmjs.com)
113
+ - Package: `@alteriom/painlessmesh`
114
+ - Installation: `npm install @alteriom/painlessmesh`
115
+ - No authentication required
116
+
117
+ 2. **GitHub Packages** (npm.pkg.github.com)
118
+ - Package: `@alteriom/painlessmesh`
119
+ - Installation: Requires `.npmrc` configuration
120
+ - Authentication required for installation
121
+
122
+ ### NPM Package Contents
123
+
124
+ The NPM package includes:
125
+ - `src/` - Complete library source code
126
+ - `examples/` - All Arduino examples
127
+ - `docs/` - Documentation files
128
+ - `library.properties` - Arduino metadata
129
+ - `library.json` - PlatformIO metadata
130
+ - Core documentation files (README, LICENSE, CHANGELOG)
131
+
132
+ Excluded from NPM package:
133
+
134
+ - Development files (`.github/`, `test/`, `scripts/`)
135
+ - Build artifacts (`bin/`, `build/`)
136
+ - IDE files and OS-specific files
137
+
138
+ ## 🔧 PlatformIO Library Registry
139
+
140
+ ### Automatic Publishing
141
+
142
+ Each release triggers the **PlatformIO Library Publishing** workflow:
143
+
144
+ 1. **Validation**: Comprehensive library.json validation
145
+ 2. **Dependencies**: Verification that all dependencies exist in PlatformIO Registry
146
+ 3. **Authentication**: Uses `PLATFORMIO_AUTH_TOKEN` secret
147
+ 4. **Publication**: Direct publishing via PlatformIO CLI
148
+ 5. **Verification**: Post-publication registry verification
149
+
150
+ ### Setup Requirements
151
+
152
+ #### One-Time Setup: PlatformIO Account & Token
153
+
154
+ 1. **Create Account**: <https://platformio.org/account/register>
155
+ 2. **Generate Token**: <https://platformio.org/account/token>
156
+ 3. **Add Secret**: Repository Settings Secrets → `PLATFORMIO_AUTH_TOKEN`
157
+
158
+ #### Automatic Workflow Trigger
159
+
160
+ The PlatformIO workflow automatically triggers on:
161
+
162
+ - New GitHub releases (tags)
163
+ - Manual workflow dispatch for testing
164
+
165
+ ### PlatformIO Package Contents
166
+
167
+ Published package includes:
168
+
169
+ - Complete source code (`src/`)
170
+ - All examples (`examples/`)
171
+ - PlatformIO metadata (`library.json`)
172
+ - Arduino compatibility (`library.properties`)
173
+ - Documentation files
174
+
175
+ ### Installation
176
+
177
+ Users can install via PlatformIO:
178
+
179
+ ```ini
180
+ # platformio.ini
181
+ [env:esp32dev]
182
+ platform = espressif32
183
+ board = esp32dev
184
+ framework = arduino
185
+ lib_deps = alteriom/AlteriomPainlessMesh@^1.6.1
186
+ ```
187
+
188
+ Or via CLI:
189
+
190
+ ```bash
191
+ pio pkg install --library "alteriom/AlteriomPainlessMesh@^1.6.1"
192
+ ```
193
+
194
+ ### Manual Publication (Fallback)
195
+
196
+ If automatic publishing fails:
197
+
198
+ ```bash
199
+ # Install PlatformIO CLI
200
+ pip install platformio
201
+
202
+ # Authenticate
203
+ pio account token --set YOUR_TOKEN
204
+
205
+ # Publish from repository root
206
+ pio pkg publish .
207
+ ```
208
+
209
+ ### Monitoring
210
+
211
+ - **Registry**: <https://registry.platformio.org/libraries>
212
+ - **Search**: <https://registry.platformio.org/search?q=AlteriomPainlessMesh>
213
+ - **Workflow**: GitHub Actions → PlatformIO Library Publishing
214
+
215
+ ## 🛠️ Arduino Library Manager
216
+
217
+ ### One-Time Submission Process
218
+
219
+ After your first release, submit to Arduino Library Manager:
220
+
221
+ 1. **Go to**: https://github.com/arduino/library-registry
222
+ 2. **Create issue** with this template:
223
+
224
+ ```
225
+ Title: Add painlessMesh library
226
+
227
+ Repository URL: https://github.com/Alteriom/painlessMesh
228
+ Release tag: v1.6.1
229
+ Library name: painlessMesh
230
+ Version: 1.6.1
231
+
232
+ This is the Alteriom fork of the painlessMesh library with enhanced
233
+ CI/CD, automated releases, and improved Arduino Library Manager compatibility.
234
+ Includes SensorPackage, CommandPackage, and StatusPackage extensions.
235
+ ```
236
+
237
+ 3. **Monitor** the issue for Arduino team approval
238
+ 4. **Future releases** are automatically indexed
239
+
240
+ ### Arduino Library Compliance
241
+
242
+ The library meets all Arduino Library Manager requirements:
243
+ - Correct directory structure
244
+ - ✅ Valid `library.properties` file
245
+ - ✅ Source files in `src/` directory
246
+ - Examples compile successfully
247
+ - ✅ Consistent version numbering
248
+ - Open source license (LGPL-3.0)
249
+
250
+ ## 📚 GitHub Wiki Management
251
+
252
+ ### Automatic Synchronization
253
+
254
+ Wiki pages are automatically updated on each release:
255
+
256
+ - **Home** - From README.md
257
+ - **Release-Guide** - From RELEASE_GUIDE.md
258
+ - **Changelog** - From CHANGELOG.md
259
+ - **API-Reference** - Generated documentation
260
+ - **Examples** - Auto-generated from examples directory
261
+ - **Installation** - Multi-platform installation guide
262
+ - **Contributing** - From CONTRIBUTING.md
263
+
264
+ ### Manual Wiki Updates
265
+
266
+ If you need to update the wiki manually:
267
+
268
+ ```bash
269
+ # Clone wiki repository
270
+ git clone https://github.com/Alteriom/painlessMesh.wiki.git
271
+
272
+ # Edit markdown files directly
273
+ # Commit and push changes
274
+ ```
275
+
276
+ Note: Manual changes may be overwritten by automatic synchronization.
277
+
278
+ ## 🔧 Scripts Reference
279
+
280
+ ### `./scripts/bump-version.sh`
281
+ Updates version in all library files with consistency checks.
282
+
283
+ **Usage:**
284
+ ```bash
285
+ ./scripts/bump-version.sh patch # Increment patch version
286
+ ./scripts/bump-version.sh minor # Increment minor version
287
+ ./scripts/bump-version.sh major # Increment major version
288
+ ./scripts/bump-version.sh patch 1.6.2 # Set specific version
289
+ ```
290
+
291
+ ### `./scripts/validate-release.sh`
292
+ Comprehensive pre-release validation.
293
+
294
+ **Checks:**
295
+ - Version consistency between all files
296
+ - Changelog entries for current version
297
+ - Git working tree status
298
+ - Tag existence validation
299
+ - Dependency declarations
300
+ - Build file presence
301
+ - Quick compilation test
302
+
303
+ ## 🚨 Troubleshooting
304
+
305
+ ### Common Issues
306
+
307
+ **Version Mismatch Error**
308
+ ```bash
309
+ # Fix version inconsistencies
310
+ ./scripts/bump-version.sh patch 1.6.2 # Force set version
311
+ ```
312
+
313
+ **Missing Changelog Entry**
314
+ ```bash
315
+ # Add changelog entry for current version
316
+ vim CHANGELOG.md
317
+ # Add section: ## [1.6.2] - YYYY-MM-DD
318
+ ```
319
+
320
+ **Build Failures**
321
+ ```bash
322
+ # Test locally before release
323
+ npm run build
324
+ npm run test
325
+ ```
326
+
327
+ **NPM Token Invalid**
328
+ ```bash
329
+ # Verify NPM authentication
330
+ npm whoami
331
+ # If not logged in: npm login
332
+ ```
333
+
334
+ **GitHub Packages Authentication**
335
+ ```bash
336
+ # Check if GITHUB_TOKEN has packages:write permission
337
+ # Repository Settings → Actions → General → Permissions
338
+ ```
339
+
340
+ **Wiki Update Failure**
341
+ ```bash
342
+ # Wiki may need manual initialization
343
+ # Go to: https://github.com/Alteriom/painlessMesh/wiki
344
+ # Create any page to initialize, then re-run release
345
+ ```
346
+
347
+ ### Manual Override
348
+
349
+ If automation fails, you can manually perform any step:
350
+
351
+ ```bash
352
+ # Manual NPM publish
353
+ npm publish --access public
354
+
355
+ # Manual GitHub release
356
+ gh release create v1.6.2 --title "painlessMesh v1.6.2" --notes-file CHANGELOG.md
357
+
358
+ # Manual tag creation
359
+ git tag v1.6.2
360
+ git push origin v1.6.2
361
+ ```
362
+
363
+ ## 🔍 Validation Commands
364
+
365
+ ### Pre-Release Checks
366
+ ```bash
367
+ # Comprehensive validation
368
+ ./scripts/validate-release.sh
369
+
370
+ # Version consistency check
371
+ ./scripts/bump-version.sh --verify || echo "Use proper arguments"
372
+
373
+ # NPM package validation
374
+ npm run validate-library
375
+
376
+ # Build test
377
+ npm run build && npm run test
378
+ ```
379
+
380
+ ### Post-Release Verification
381
+ ```bash
382
+ # Check NPM publication
383
+ npm view @alteriom/painlessmesh
384
+
385
+ # Check GitHub Packages
386
+ npm view @alteriom/painlessmesh --registry=https://npm.pkg.github.com
387
+
388
+ # Check PlatformIO Registry
389
+ pio pkg search "AlteriomPainlessMesh"
390
+
391
+ # Verify GitHub release
392
+ gh release view
393
+
394
+ # Check wiki update
395
+ curl -s https://github.com/Alteriom/painlessMesh/wiki | grep -q "v1.6.2"
396
+ ```
397
+
398
+ ## 🎉 Success Indicators
399
+
400
+ ### Successful Release Shows:
401
+ - ✅ GitHub release created with changelog
402
+ - Git tag pushed to repository
403
+ - ✅ NPM package published (check npmjs.com)
404
+ - ✅ GitHub Packages updated
405
+ - Wiki pages synchronized
406
+ - All GitHub Actions workflows completed successfully
407
+
408
+ ### Distribution Verification:
409
+ ```bash
410
+ # Public NPM
411
+ npm view @alteriom/painlessmesh
412
+
413
+ # GitHub Packages
414
+ npm view @alteriom/painlessmesh --registry=https://npm.pkg.github.com
415
+
416
+ # PlatformIO (updated within minutes via GitHub Actions)
417
+ # Check: https://registry.platformio.org/libraries/alteriom/AlteriomPainlessMesh
418
+
419
+ # Arduino Library Manager (after manual submission)
420
+ # Search in Arduino IDE Library Manager
421
+ ```
422
+
423
+ ## 🌟 Advanced Topics
424
+
425
+ ### Custom Release Notes
426
+
427
+ To customize release notes beyond the changelog:
428
+
429
+ 1. Edit the generated `release_notes.txt` in the workflow
430
+ 2. Or create a custom release notes file in `.github/release-template.md`
431
+
432
+ ### Environment-Specific Releases
433
+
434
+ For testing releases:
435
+
436
+ ```bash
437
+ # Use pre-release tags
438
+ git tag v1.6.2-beta
439
+ git push origin v1.6.2-beta
440
+
441
+ # This creates a pre-release without full publication
442
+ ```
443
+
444
+ ### Rollback Procedure
445
+
446
+ If a release has issues:
447
+
448
+ ```bash
449
+ # Delete remote tag
450
+ git push origin :refs/tags/v1.6.2
451
+
452
+ # Delete local tag
453
+ git tag -d v1.6.2
454
+
455
+ # Delete GitHub release
456
+ gh release delete v1.6.2
457
+
458
+ # Unpublish NPM package (contact npm support)
459
+ # GitHub Packages: Delete from package settings
460
+ ```
461
+
462
+ ## 📊 Release Metrics
463
+
464
+ Monitor your releases:
465
+ - **GitHub**: https://github.com/Alteriom/painlessMesh/releases
466
+ - **NPM**: https://www.npmjs.com/package/@alteriom/painlessmesh
467
+ - **PlatformIO**: https://registry.platformio.org/libraries/alteriom/painlessMesh
468
+ - **Wiki**: https://github.com/Alteriom/painlessMesh/wiki
469
+
470
+ ## 🤝 Security & Permissions
471
+
472
+ ### Required GitHub Secrets
473
+
474
+ - `GITHUB_TOKEN`: Automatically provided by GitHub Actions
475
+ - `NPM_TOKEN`: Required for NPM publishing (add in repository secrets)
476
+ - `PLATFORMIO_AUTH_TOKEN`: Required for PlatformIO Library Registry publishing
477
+
478
+ ### Repository Settings
479
+ - **Actions**: Enabled with write permissions
480
+ - **Packages**: Enabled for GitHub Packages publication
481
+ - **Wiki**: Enabled for documentation deployment
482
+ - **Releases**: Public releases enabled
483
+
484
+ ---
485
+
486
+ ## Quick Reference
487
+
488
+ **Release a patch version:**
489
+ ```bash
490
+ ./scripts/bump-version.sh patch
491
+ # Edit CHANGELOG.md
492
+ git add . && git commit -m "release: v1.6.2" && git push
493
+ ```
494
+
495
+ **Check release status:**
496
+ ```bash
497
+ ./scripts/validate-release.sh
498
+ ```
499
+
500
+ **Monitor release:**
501
+ - GitHub Actions: https://github.com/Alteriom/painlessMesh/actions
502
+ - Releases: https://github.com/Alteriom/painlessMesh/releases
503
+ - Documentation: https://github.com/Alteriom/painlessMesh/wiki
504
+
419
505
  For questions or issues with the release process, create an issue with the `ci/cd` label.