Closed Arjan-Zuidema closed 4 years ago
@Arjan-Zuidema Are you sure it's not a directory?
The files are downloaded using actions/download-artifact@v1
with the exact same paths, so how can it be a directory? Maybe it's a bug in actions/download-artifact@v1
but I don't know.
@Arjan-Zuidema I just ran into this as well. You probably want to download-artifact
into your current directory. download-artifact
will unzip your artifact into a directory given as the path
argument
- name: Upload the artifact
uses: actions/upload-artifact@v1
with:
name: my-artifact
path: path/to/my/artifact.tar.gz
# ... next job or whenever you need the artifact
- name: Download the artifact
uses: actions/download-artifact@v1
with:
name: my-artifact
path: ./
- name: Upload the 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: artifact.tar.gz
asset_name: artifact.tar.gz
asset_content_type: application/gzip
@Arjan-Zuidema I just ran into this as well. You probably want to
download-artifact
into your current directory.download-artifact
will unzip your artifact into a directory given as thepath
argument- name: Upload the artifact uses: actions/upload-artifact@v1 with: name: my-artifact path: path/to/my/artifact.tar.gz # ... next job or whenever you need the artifact - name: Download the artifact uses: actions/download-artifact@v1 with: name: my-artifact path: ./ - name: Upload the 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: artifact.tar.gz asset_name: artifact.tar.gz asset_content_type: application/gzip
Will look into it. Thanks! 🙂
Setting path
to the directory seems to fix the problem. It was unclear to me it had to be a directory and not a file path.
I have a workflow that build two versions of an application. One for Windows and one for MacOS. These builds run in parallel. When finished a new job is spawned to create a GitHub release ad publish the files to that release.
I am using
actions/download-artifact@v1
to download the artifacts from the previous jobs. When trying to upload the files to the release I get an error:EISDIR: illegal operation on a directory, read
. See log of theactions/upload-release-asset
step below: