Subversion Repositories ESP8266_P1_Meter

Rev

Blame | Last modification | View Log | RSS feed

name: Push to PlatformIO registry
on:
  release:
    types: [created]
jobs:
  build_examples_for_verification:
    uses: ./.github/workflows/platformio.yaml
  upload_library:
    runs-on: ubuntu-latest
    needs: [build_examples_for_verification]

    strategy:
      matrix:
        target:
          - name: espidf
            library: library.json
          - name: esp8266
            library: library.json.esp8266

    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v4
        with:
          python-version: '3.9'
      - name: Install PlatformIO Core
        run: pip install --upgrade platformio

      - name: Copy library.json to root (if not src is also in root)
        run: mv ${{ matrix.target.library }} ./library.json || true
        if: ${{ matrix.target.library != './library.json' }}

      - name: Publish PlatformIO library
        run: pio pkg publish --owner johboh --no-notify --no-interactive
        env:
          PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}