Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading artifacts to existing tag/release #403

Open
vitalykarasik opened this issue Dec 31, 2023 · 3 comments
Open

Uploading artifacts to existing tag/release #403

vitalykarasik opened this issue Dec 31, 2023 · 3 comments

Comments

@vitalykarasik
Copy link

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

@koss110
Copy link

koss110 commented Jan 25, 2024

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

@vitalykarasik
Copy link
Author

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.

@wax911
Copy link

wax911 commented Mar 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants