Learning Goals 5 min
The Arduino Library Manager is the discovery / install service for thousands of community libraries. Submitting your own makes it appear in every Arduino user's IDE. By the end of this lesson you will:
- Set up a GitHub repository for your library with the right structure.
- Apply semantic versioning + Git tags + a release.
- Submit a pull request to the Arduino Library Registry to add your library to the Library Manager.
Warm-Up 10 min
Pre-requisites:
- GitHub account (free).
- Git installed locally.
- Your polished Blinker library from L04-42.
The publishing flow
- Push your library to a public GitHub repository.
- Tag a release version (e.g.
v1.0.0). - Submit your repo's URL via a PR to the Arduino Library Registry.
- Wait ~1 day for review. If accepted, the library appears in everyone's Library Manager search results.
New Concept · Semantic versioning + Git tags 25 min
Semantic versioning
Versions are MAJOR.MINOR.PATCH:
- PATCH bump (1.0.0 → 1.0.1): bug fix, no API change.
- MINOR (1.0.1 → 1.1.0): new feature, backward-compatible.
- MAJOR (1.1.0 → 2.0.0): breaking change. Users need code updates.
Update library.properties's version field with every release.
Git tags = releases
The Library Manager looks for Git tags that match a semver pattern. To release v1.0.0:
git tag 1.0.0 git push --tags
Or use GitHub's "Releases" page → Draft new release → tag 1.0.0. Either creates a tag the Library Manager scans.
Required for submission
- Public GitHub repo.
- At least one Git tag matching MAJOR.MINOR.PATCH (no leading "v").
- library.properties at the repo root, with all required fields.
- No restricted code (no copyrighted material, no external dependencies that aren't available).
- Compiles cleanly.
The submission PR
Fork github.com/arduino/library-registry. Edit repositories.txt and add one line: your repo URL. Send PR. Arduino bots check; if all is well, a human merges within a day.
# repositories.txt (excerpt) https://github.com/yourname/Blinker.git
After approval
Your library shows up in every Arduino IDE's Library Manager search within ~1 hour. Users click Install — done.
Releasing updates
To ship v1.0.1:
- Update
version=1.0.1in library.properties. - Commit. Push.
- Tag:
git tag 1.0.1; push tags. - ~1 hour later, IDE users see "Update available".
License
Include a LICENSE file. Common picks for Arduino libraries: MIT (permissive), Apache 2.0 (permissive + patent grant), LGPL (copyleft-lite). Without a license, your code is "all rights reserved" — others can't legally use it.
Worked Example · Publish Blinker 25 min
Step 1 — git init
cd ~/Documents/Arduino/libraries/Blinker git init git add . git commit -m "Initial commit"
Step 2 — create the GitHub repo
On github.com → New repository → name Blinker → public. Follow the instructions to push your existing local repo:
git branch -M main git remote add origin https://github.com/yourname/Blinker.git git push -u origin main
Step 3 — add LICENSE
GitHub web UI → Add file → Create new file → name "LICENSE" → click "Choose a license template" → pick MIT. Commit.
Step 4 — pull the LICENSE locally + tag
git pull git tag 1.0.0 git push --tags
Step 5 — submit to Library Registry
Fork github.com/arduino/library-registry. Edit repositories.txt. Add a line with your repo URL. Open PR. Submit.
Step 6 — wait
Bots run a series of checks (compilation, structure, metadata). Usually pass within 30 minutes. A human reviewer merges within a day or two. After merge, your library is in the registry.
Step 7 — verify
Open Arduino IDE → Library Manager → search "Blinker yourname". Click Install. Try the example. Yours is now shipping to the world.
Basic 5 min
Goal: The Library Registry rejected this release of Blinker. Find the four faults in the file and the command, then fix them.
name=Blinker version=1.0 author=Your Name <you@example.com> sentence=Non-blocking LED blinker for Arduino. paragraph=Wraps the millis() blink-without-delay pattern into a reusable class. category=Signal Input/Output url=https://github.com/yourname/Blinker architectures=avr
git tag v1.0.0 git push --tags
Then give the next version number for each of these releases, in order, starting from 1.0.0:
- You fix a bug where
pause()did nothing. - You add a new method,
blinkCount(). - You rename
setRate()tosetTiming().
It works if your fixed file has every required field, and the tag and the version line match exactly.
Challenge 1 5 min
Goal: Set up GitHub Actions to auto-compile your library's examples on each push. Use the official arduino/compile-sketches action. Catches broken examples before users see them.
Challenge 2 5 min
Goal: Submit the PR to the Library Registry. Get your library actually listed. (Real publishing — once it's out there, it's out there.)
Challenge 3 · A polished release checklist 10 min
Before submitting any library to the Registry, check:
- Repo is public.
- LICENSE file present.
- README explains usage + has a quick example.
- library.properties has all required fields.
- keywords.txt is tab-separated.
- examples/<n> folders each have an .ino that compiles.
- Code compiles cleanly on at least UNO.
- Git tag matches MAJOR.MINOR.PATCH (no "v").
Cross-check yours. If any item fails, fix before submitting.
Recap 5 min
Publishing = public GitHub + LICENSE + Git tag matching semver + one-line PR to the Arduino Library Registry. ~1 day approval. Your library appears in the IDE's Library Manager search for every Arduino user. Tomorrow we ship one of your sensor wrappers as Cluster H's capstone.
- Semantic versioning
- MAJOR.MINOR.PATCH versioning scheme. Patch = bug fix; minor = feature; major = breaking change.
- Git tag
- A named pointer to a specific commit. Library Manager uses tags as release markers.
- Library Manager
- The Arduino IDE's built-in library installer. Reads from a central registry.
- Arduino Library Registry
- Public list of libraries the Library Manager surfaces. Hosted at
github.com/arduino/library-registry. - LICENSE file
- Tells others what they can / can't do with your code. MIT is a popular permissive choice.
- GitHub Actions
- Auto-run scripts on git events. Common: compile-test on each push.
- arduino-cli
- Command-line Arduino IDE. Useful for CI / scripted compilation of libraries.
Extra Mission 5 min
Part 1 — Plan your library's version history
On paper, plan the life of one library you have built, from its first release to its first breaking change.
Your plan must include:
- What is in version 1.0.0.
- Two features you might add later, each with the version number it would get.
- One change that would break users' code, why you might need it, and its version number.
- The licence you chose, and one reason for it.
Part 2 — Make it
Put your library under Git. Tag 1.0.0. Add the first new feature from your plan, update library.properties, and tag the new version. Pushing to GitHub is optional.
Bring back next class: a screenshot of git tag and git log --oneline, and your final library.properties. Pick one of your sensor or motor wrappers for ARD-L04-44.