Release state reset to draft


I’ve a repo where I created a release (let’s say 1.0.0) for the commit #a1a1a1. On the side, I’ve setup a github action which increments the version of my codebase with the trigger “release published”.

The actions calls for npm version, which increase the version according to the release’s tag, creates a commit (let’s say #b2b2b2) and sets up a git tag to that particular commit.

Since the tag 1.0.0 already exists (because it was created at the release publication), i thought it could just force push the new tag created by the npm command, which to this new commit (#b2b2b2).

It works great, the release gets updated to the new tag, and the data is all good except that the release status is back from “published” to “draft”.

I feel it’s a bug since as in as long as the git tag exists, the state of the release should not change back to draft. Could you try to fix it please? Or at least could you provide some recommendations on how to have the following flow:

  1. Create a release
  2. Publication of release triggers Github actions
  3. Github action calls “npm version”
  4. Release is properly working

PS: setting back the release status to publish through API is not an option since it would trigger the workflow again :sweat: