release-please-action icon indicating copy to clipboard operation
release-please-action copied to clipboard

Tag release after the action has run

Open mraerino opened this issue 3 years ago • 2 comments

We're using this action and its output to trigger a publish workflow in the same job if a new release PR has just been merged, similar to this example: https://github.com/google-github-actions/release-please-action#automating-publication-to-npm

Now if the publishing steps fail you'll end up in an inconsistent state:

  • Release-please has already tagged a release and marked the PR as processed
  • The published artifact does not actually exist

This could be solved by tagging the release and marking the release PR as tagged after the publish steps are done. More specifically, you can use a post step in github actions to do this: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#post

Would you consider this a good idea?

mraerino avatar Apr 07 '21 22:04 mraerino

This is 💯 Since tagging and releasing can also fail, another option is to have a revert operation which will revert the PR, delete the release+tag and re-create the release PR so it can be retried.

erezrokah avatar Apr 08 '21 08:04 erezrokah

@mraerino this seems like a good suggestion 👍

bcoe avatar Apr 20 '21 00:04 bcoe