ArduinoLevel 4 · Cert PrepLesson 43

Level 4 · Lesson 43 · ARD-L04-43

Publishing to Library Manager

90 minutes · Ages 13–16 · Cluster H · Writing Custom Libraries

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:

  1. Set up a GitHub repository for your library with the right structure.
  2. Apply semantic versioning + Git tags + a release.
  3. 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

  1. Push your library to a public GitHub repository.
  2. Tag a release version (e.g. v1.0.0).
  3. Submit your repo's URL via a PR to the Arduino Library Registry.
  4. 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

  1. Public GitHub repo.
  2. At least one Git tag matching MAJOR.MINOR.PATCH (no leading "v").
  3. library.properties at the repo root, with all required fields.
  4. No restricted code (no copyrighted material, no external dependencies that aren't available).
  5. 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:

  1. Update version=1.0.1 in library.properties.
  2. Commit. Push.
  3. Tag: git tag 1.0.1; push tags.
  4. ~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.

Try It Yourself 15 min

🟢 Easy

Goal: Add a README.md with usage instructions, screenshots / diagrams, and a license badge.

🟡 Medium

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.

🔴 Stretch

Goal: Submit the PR to the Library Registry. Get your library actually listed. (Real publishing — once it's out there, it's out there.)

Mini-Challenge · A polished release checklist 10 min

Before submitting any library to the Registry, check:

  1. Repo is public.
  2. LICENSE file present.
  3. README explains usage + has a quick example.
  4. library.properties has all required fields.
  5. keywords.txt is tab-separated.
  6. examples/<n> folders each have an .ino that compiles.
  7. Code compiles cleanly on at least UNO.
  8. 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.

Homework 5 min

  1. Push your Blinker library to GitHub. Tag 1.0.0.
  2. Add LICENSE + README.
  3. Read ahead to ARD-L04-44 (Package Your Driver). Pick one of your Cluster A-G sensor wrappers (SmoothedSensor, RangeFinder, motor.h, etc.) for the capstone.