UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.35k stars 420 forks source link

feat: add esp-idf component manifests generation #555

Open UncleRus opened 11 months ago

UncleRus commented 11 months ago

python ./devtools/devtool.py manifest --namespace=eil

UncleRus commented 11 months ago

There are some ambiguities:

  1. Who exactly will be the component maintainer? Will it be the maintainers of the repository (@UncleRus, @trombik) or those listed in the code_owners field in the metadata?
  2. What namespace should we use? I've made the default eil for now. It's clear that the answer will depend on the registration in the Espressif registry. @trombik, it seems you have already applied for registration? Was it a private application or from esp-idf-lib?
  3. How should we update the components in the registry? I tend to generate manifests and upload components individually, only modified ones, by packaging the component and its examples in a separate archive. At the moment, devtool generates new manifests for all components of the repository, but this can be easily redone.
trombik commented 10 months ago

Sorry, I've been in a difficult situation. I cannot contribute at the moment. Hope I'll be able to help the project soon.

hayschan commented 4 months ago

Updating the components in the registry, I suggest we lean towards generating manifests and uploading components individually, focusing on those that have been modified. This method, where each component and its examples are bundled in separate archives, seems to be a practical way to ensure updates are managed efficiently.

I found that the official GitHub action, upload-components-ci-action, is perfectly suited for this task. It even has a neat example on how to handle multiple components from a single repository, which could really simplify our process.

name: Push components to https://components.espressif.com
on:
  push:
    branches:
      - main
jobs:
  upload_components:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: "recursive"
      - name: Upload components to the component registry
        uses: espressif/upload-components-ci-action@v1
        with:
          directories: "components/my_component;components/another_component"
          namespace: "espressif" # we should change it to esp-idf-lib
          api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}