Skip to content

Platformio_setup_summary

github-actions[bot] edited this page Sep 30, 2025 · 3 revisions

PlatformIO Publishing Setup Summary

✅ What's Been Implemented

1. Dedicated PlatformIO Publishing Workflow

  • File: .github/workflows/platformio-publish.yml
  • Triggers: Automatic on releases, manual dispatch for testing
  • Features: Complete validation, authentication, and publishing pipeline

2. Library Configuration Enhanced

  • Updated library.json: PlatformIO-specific optimizations
  • Name: Changed to "AlteriomPainlessMesh" for uniqueness
  • Dependencies: All verified available in PlatformIO Registry
  • Metadata: Enhanced with license, examples, export configuration

3. Release Process Integration

  • Main release workflow now references PlatformIO publishing
  • Documentation updated in RELEASE_GUIDE.md
  • Comprehensive instructions in docs/platformio-publishing.md

🚀 How It Works

Automatic Publishing

  1. Release Created: GitHub release triggers PlatformIO workflow
  2. Validation: Library.json format and dependencies checked
  3. Authentication: Uses PLATFORMIO_AUTH_TOKEN secret
  4. Publication: Direct publishing via PlatformIO CLI
  5. Verification: Registry confirmation and user notification

Manual Publishing (Alternative)

  1. Go to GitHub Actions → PlatformIO Library Publishing
  2. Click "Run workflow"
  3. Enter version number and optional force publish
  4. Workflow handles the rest

🔧 Setup Required

One-Time Setup: PlatformIO Account

  1. Create Account: https://platformio.org/account/register
  2. Generate Token: https://platformio.org/account/token
  3. Add to Secrets: Repository Settings → Secrets → Actions
    • Name: PLATFORMIO_AUTH_TOKEN
    • Value: [your token from step 2]

Local Testing (Optional):

# Method 1: Environment variable
$env:PLATFORMIO_AUTH_TOKEN="YOUR_TOKEN_HERE"
pio account show  # Verify authentication

# Method 2: Interactive login (if token doesn't work)
pio account login

# Test publishing
pio pkg publish . --no-interactive

Troubleshooting Authentication:

# If authentication fails:
1. Go to https://platformio.org/account/token
2. Copy your existing token OR generate a new one
3. Set it as environment variable: $env:PLATFORMIO_AUTH_TOKEN="token"
4. Test: pio account show

Current Status for v1.6.1

Since v1.6.1 is already released and published to other platforms:

Option A: Test with Manual Workflow

1. Go to: https://github.com/Alteriom/painlessMesh/actions/workflows/platformio-publish.yml
2. Click "Run workflow"
3. Set version: 1.6.1
4. Enable force_publish: true
5. Click "Run workflow"

Option B: Wait for Next Release

The PlatformIO workflow will automatically trigger on your next release (v1.6.2, etc.)

📋 Future Releases

For all future releases, PlatformIO publishing is now fully automated:

# Standard release process remains the same
./scripts/bump-version.sh patch
# Edit CHANGELOG.md
git add . && git commit -m "release: v1.6.2" && git push

This will now automatically:

  • ✅ Create GitHub release
  • ✅ Publish to NPM
  • ✅ Publish to PlatformIO Registry
  • ✅ Update GitHub Wiki
  • ✅ Prepare Arduino Library Manager package

🔍 Verification

After publishing, verify at:

📚 Documentation

Complete documentation available:

  • Publishing Guide: docs/platformio-publishing.md
  • Release Process: RELEASE_GUIDE.md (updated)
  • Workflow Details: .github/workflows/platformio-publish.yml

🎯 Next Steps

  1. Add PlatformIO Token: Set up the PLATFORMIO_AUTH_TOKEN secret
  2. Test Workflow: Run manual workflow for v1.6.1 (optional)
  3. Next Release: PlatformIO publishing will be automatic

The PlatformIO publishing is now fully integrated into your release pipeline! 🎉

Clone this wiki locally