name: Push LVGL release to Espressif Component Service

# If the commit is tagged, it will be uploaded. Other scenario silently fail.
on:
  push:
    branches:
      - master

jobs:
  upload_components:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
        with:
          submodules: "recursive"

      - name: Upload component to component registry
        uses: espressif/github-actions/upload_components@master
        with:
          name: "lvgl"
          version: "git"
          namespace: "lvgl"
          api_token: ${{ secrets.ESP_IDF_COMPONENT_API_TOKEN }}
