name: 'Upload Coverage'
description: 'Uploads code coverage reports to codecov with separate flags for separate packages'
runs:
  using: 'composite'
  steps:
    - name: Upload Builders Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/builders/coverage/cobertura-coverage.xml
        flags: builders

    - name: Upload Collection Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/collection/coverage/cobertura-coverage.xml
        flags: collection

    - name: Upload Discord.js Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/discord.js/coverage/cobertura-coverage.xml
        flags: discord.js

    - name: Upload Proxy Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/proxy/coverage/cobertura-coverage.xml
        flags: proxy

    - name: Upload Rest Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/rest/coverage/cobertura-coverage.xml
        flags: rest

    - name: Upload Voice Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/voice/coverage/cobertura-coverage.xml
        flags: voice

    - name: Upload Website Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/website/coverage/cobertura-coverage.xml
        flags: website

    - name: Upload WS Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/ws/coverage/cobertura-coverage.xml
        flags: ws

    - name: Upload Utilities Coverage
      uses: codecov/codecov-action@v3
      with:
        files: ./packages/actions/coverage/cobertura-coverage.xml, ./packages/scripts/coverage/cobertura-coverage.xml
        flags: utilities
