I am trying to publish/release a zip file built during a workflow triggered when pushing a tag, but the release step is unable to find the zip file.
The workflow first builds and uploads an artifact using something like
uses: actions/upload-artifact@v4
with:
name: Test-${{ github.ref_name }}
path: |
...
This completes and when I go to actions I can see and download the artifact.
I would like to automatically create a release which includes this zip file and I have tried
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} Test-${{ github.ref_name }}.zip --generate-notes
But this fails as it cannot find the zip file.
The previous step gives me an Artifact download URL which works if I download from a browser and the name of the zip file is correct based on the tag name, but when I try to use ${{ steps.upload-plugin.outputs.artifact-url }}
or even ${{ steps.upload-plugin.outputs.artifact-url }}/Test-${{ github.ref_name }}.zip
it also can not find the file.
There are other similar questions on Stack Overflow, but all seem to require knowing the location of the file you want to release, which I think is my problem.
Any ideas?