action-gh-release
action-gh-release copied to clipboard
Uploading artifacts to existing tag/release
Either I'm missing something basic, or there is a weird bug. When I'm using this code in my workflow and triggering workflow using 'release create' event, action works nice:
- name: Upload Release assets
uses: softprops/action-gh-release@v1
with:
files: dist/**
But if I'm calling my workflow in another way [i.e. via push event or with workflow_call] and providing tag_name, it fails with "resource":"Release","code":"already_exists","field":"tag_name".
- name: Upload Release assets
uses: softprops/action-gh-release@v1
with:
files: dist/**
tag_name: 'refs/tags/v0.91.31.00'
In both cases, Github tag and release already existed before I called my workflow. So why in the first case it worked, and in another case failed?
Any idea how to explain that? Thanks, Vitaly
If I understand the concept correctly, it should be triggered only once per each TAG. In case you have to update existing release, you have to rename/delete it before before. Since you want to update some existing release, I assume there are some code changes, so the tag/version should be patched. @vitalykarasik
In case you have to update existing release, you have to rename/delete it before.
Agree in general. But in my case, I have a few workflows, that build artifacts, and all of them should be attached to the same GitHub release.
I am also interested in the development of this, in my use case I have https://github.com/release-drafter/release-drafter which generates a draft release and tag with change-log and manages version resolution based on branch/label rules, follow by a custom workflow which will generate assets upon the publication of the tag & release which I would like to ideally attach assets to