Publishing a new library

Can you give a concrete example to publish a library.
I have a new library on GitHub - sstaub/LCD: Arduino LCD library for HD44780 displays
What is the right command?
Also the library structure you suggest doesn’t work with the Arduino IDE when adding a zip library.

Login into your PIO account (this is different to your community account) with the commands as documented. Otherwise the package can’t be associated to its owner.

Then publish the package by cloning your repo and doing a pio package publish . in it (docs)

Which structure exactly and which incompatibility?

I know about the command

But how to use it with a GitHub repository (library.json is included)? The docs have no real world example like in former versions.

Bildschirmfoto 2020-09-26 um 17.46.08

1 Like

Meanwhile I got it to work. A better explanation in the docs will helpful.

It’s now the same account. Or better, 1 single account for all our services.

1 Like

What could we improve? Have you seen this page Creating Library — PlatformIO latest documentation?

I have seen the docs, but a step by step example will useful.
I get it accidentally to work. I tried the ‘package publish’ command while I have a project file open which included the library I wished to publish, accidentally!
It is not really described when or were this command works. The old register command was much clearer in how to use.
Also the new preferred structure is a problem when you want to use a library, published on Github, in the Arduino IDE. It seems that the .h files in the include folder is a problem when you want import a library as a .zip file. When I create a library, it must work also with the original Arduino IDE.

Have you tried it with the header files located in src or just in the preferred location. (Which I take to mean we would like you to locate header files in the include directory,but it’s not really mandatory!)

I have yet to publish a library, but I’m working on some for the Arduino and PlatformIO at the moment.

Give it a try, you never know…