actions / upload-release-asset

An Action to upload a release asset via the GitHub Release API
MIT License
683 stars 187 forks source link

Still getting EISDIR: illegal operation on a directory, read #67

Closed nuhkoca closed 3 years ago

nuhkoca commented 3 years ago

Hello,

I am still getting EISDIR: illegal operation on a directory, read error despite the fact that I followed solutions in #35. Here is my sample .yml content. Can you please tell me what I am doing wrong? Thanks!

      - name: Upload Sample Artifacts
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: release-apk
          path: app_name/build/outputs/apk

      - name: Download the artifact
        uses: actions/download-artifact@v2
        with:
          name: release-apk
          path: release-apk

      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          draft: false
          prerelease: false

      - name: Upload Release Asset
        id: upload-release-asset
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: release-apk
          asset_name: ${{ github.ref }}
          asset_content_type: application/zip
hextruda commented 3 years ago

having the same issue, did you find a solution?

nuhkoca commented 3 years ago

Hi @howzitcal

Yes! The main part here is that download-artifact always downloads and unzip files to the target directory. Since I missed unzipping logic, I was pretty confused. I continuously tried to access the zipped file with its explicit name which I specify in upload-artifact step. Instead, I solved this by accessing its unzipped file name. For example;

- name: Display structure of downloaded files
  run: ls -R

Please let me know if you need any help.