Cut a new Button2 release. Follow these steps exactly:
Step 1: Determine the version
Read library.json to get the current version.
Read the ## Unreleased section of CHANGELOG.md to understand what changed.
If $ARGUMENTS is provided, use that as the new version. Otherwise:
- Classify the unreleased changes:
- Major (x.0.0): breaking API changes, removed functions, changed signatures
- Minor (x.y.0): new public functions, new features, new examples
- Patch (x.y.z): bug fixes, internal changes, test additions, docs
- Suggest the new version with a one-line explanation of your reasoning
- Use AskUserQuestion to ask the user to confirm the suggested version or provide a different one
Step 2: Update version files
Update the version number in both:
library.json— the"version"fieldlibrary.properties— theversion=line
Step 3: Finalize CHANGELOG
In CHANGELOG.md:
- Rename
## Unreleasedto## [x.y.z] - YYYY-MM-DD(use today's date and the new version) - Add a fresh
## Unreleasedsection above it (empty, just the heading)
Step 4: Commit, tag, push
git add library.json library.properties CHANGELOG.md
git commit -m "chore: release vX.Y.Z"
git tag vX.Y.Z
git push && git push --tags
Step 5: Create GitHub release
Extract the release notes for this version from the CHANGELOG (the bullet points under ## [x.y.z]), then run:
gh release create vX.Y.Z \
--title "vX.Y.Z" \
--notes "<changelog bullet points for this version>"
Step 6: Publish to PlatformIO registry
pio pkg publish --no-interactive
This pushes directly to the PlatformIO registry. The Arduino Library Manager picks up the new tag automatically from GitHub — no separate step needed there.
Confirm each step succeeded and report which registries were updated.