Uploading a Library to the library manager from a Github branch

Hello, I am trying to upload a library to the Arduino Library Manager. I know the GitHub - arduino/library-registry: Arduino Library Manager list repository, and I have already read the instructions, but I have a question that I hope someone can explain to me.

The project I am working on is multiplatform, and to fulfill all the requirements for multiple platforms, many files are not required for the Arduino compilation process. I work around this because, with the help of GitHub actions, I have automated a workflow that publishes a branch within the project with an adequate file structure that complies with the Arduino library specification.

On the library-registry repo, step 7 says: " This should be the URL of the repository home page. For example: https://github.com/arduino-libraries/Servo" I am wondering if, in this section, I can put the link to the Arduino branch on the project.

This would mean to include :
https://github.com/myProfileName/myProjectName/tree/Arduino

Instead of :
https://github.com/myProfileName/myProjectName

With the reasoning that the second URL would contain many files that are not needed in an Arduino environment

Hi @cheche_romo.

No. The URL must be to the home page of the repository.

The way the Library Manager indexer works:

  1. Clone the repository from the registered URL.
  2. Check out each Git tag in the repository.
  3. Check to see whether the repository contains a valid Arduino library release at that tag
  4. Check to see whether the library release at that tag is already in the index.
  5. If it is a valid new library release, add the release to the index.

So there is no problem with having the Arduino library in a different branches in the repository because the indexer doesn't work from branches. It works from tags, which are independent from branches. You must only make sure that you make a Git tag at the commit ref in the Arduino library branch at the point in the revision history where you make a release.

In case you also want to tag your default and other branches, that is fine. Even though tags are the unit of release for Library Manager, the versioning of the library releases is done exclusively using the value of the version field of the library.properties metadata file. So you can add something to the tag names to differentiate the Arduino library release tags from tags made in other branches (e.g., Arduino-1.2.3, 1.2.3.

The one consideration with the release strategy I mentioned above is that the submission validation system that checks for problems with the library when you submit it for inclusion in Library Manager checks out the most recent tag in the repository and does the validation on that tag. So you do need to make sure that the Arduino Library release tag is the most recent tag at the time you submit the library.

Once the submission is accepted, all tags in the repository will always be processed (ignoring those that don't pass Arduino Library validation), so it won't matter after that if tags from branches that don't contain an Arduino library are the most recent tags in the repository.

Please let me know if anything is unclear or if you have any concerns.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.