Is it possible to update existing release? #38
-
I have created a release using - name: Create Release
uses: ncipollo/release-action@v1
with:
name: ${{ env.next_version }}
tag: ${{ env.next_version }}
commit: master
allowUpdates: true
prerelease: false
draft: false
token: ${{ secrets.GITHUB_TOKEN }} Let us suppose that it created a tag and release for Now next time when I run my workflow I want to update this
This is the workflow which I am trying to run.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
My use case is related to Github Actions. I have a Github Action and I released its version So what I want to do is whenever a new release is made I want to update the base version which in this case is I hope you get an idea. |
Beta Was this translation helpful? Give feedback.
-
Hi @ravgeetdhillon , Check out the documentation for that call: https://docs.github.com/en/rest/reference/repos#create-a-release . Note the description of
In other words, the API will not update the commit the tag is pointing to if that tag already exists. If you want to automate tag management via a workflow I think your best bet would be to have a step which leans on a simple bash script which does something like All that being said I would actually advice against automating tag management in this use case. As you alluded to in your second comment, human decision making is required in order to determine if a change set constitutes a a major, minor or patch release. If you attempted to automate this, you could end up unintentionally making a breaking change which gets synced to Also, on a semi-related note: I would avoid updating a tag like |
Beta Was this translation helpful? Give feedback.
-
Hi @ravgeetdhillon,
|
Beta Was this translation helpful? Give feedback.
Hi @ravgeetdhillon,
I more or less follow the recommendations here: https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations
git tag 1.0.1
git push origin 1.0.1
git tag -f v1
git push -f origin 1.0.1