name: "Modlist update"
on: push
jobs:
  update:
    runs-on: minecraft
    steps:
      - name: "grabbing new mods"
        uses: actions/checkout@v4

      - name: "unzip mods"
        shell: bash
        id: getfiles
        run: |
          unzip unzip_me.zip
          echo "files='$(ls --format=comma *.jar)'"
          echo "files='$(ls --format=comma *.jar)'" >> $GITHUB_OUTPUT

      - name: "truncate readme"
        shell: bash
        run: |
          sed -i 's/MODS:.*/MODS:/' README.md
          cat README.md
          echo ${{steps.getfiles.outputs.files}} >> README.md
          cat README.md
          echo ${{steps.getfiles.outputs.files}}
          echo "${{steps.getfiles.outputs.files}}"
