In my release script I have these actions, among others:
- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.createReleaseTag.outputs.string}}
release_name: ${{github.sha}}
body: Auto-generated prerelease build
prerelease: true
# yes, we really do have to download the artifact we just uploaded; this job can't see it automatically
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: FrEee.WinForms-${{steps.createReleaseTag.outputs.string}}
path: FrEee.WinForms-${{steps.createReleaseTag.outputs.string}}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: "${{ steps.createRelease.outputs.upload_url }}" # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: FrEee.WinForms-${{steps.createReleaseTag.outputs.string}}
asset_name: FrEee.WinForms-${{steps.createReleaseTag.outputs.string}}
asset_content_type: application/zip
However when I run it I get this output:
Run actions/upload-release-asset@v1
with:
upload_url: https://uploads.github.com/repos/ekolis/FrEee/releases/37114727/assets{?name,label}
asset_path: FrEee.WinForms-cc1b19f204
asset_name: FrEee.WinForms-cc1b19f204
asset_content_type: application/zip
env:
DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet
GITHUB_TOKEN: ***
Error: EISDIR: illegal operation on a directory, read
What's wrong? Is the artifact somehow being treated as a directory instead of a zip file? Does this job not have permission to read the artifact that was created earlier in the action? Is something wrong with the upload URL? (Why does it have {?name,label}
in it? It's just the output from the createRelease
job...)