Push tags action not triggered when draft release published

We were using on: push: tags: v* to trigger our publish workflows with actions and it was working perfectly - when we manually created a new release, it would of course push a new tag and the workflow was triggered reliably.

However, we switched to using release-drafter to automatically create and update draft releases when we submit PRs / merge to master.

The problem is, when we would edit one of these draft releases and publish it, the tag push did not trigger and the publish workflow would not run. This is odd because the UI for the release would state that a new tag would be created, but the push-tags-v* workflow would not trigger. If I deleted the release and tag and recreated it manually, the workflow would trigger again.

This appears to be a bug that the tag push event is not emitted when a draft release is converted to a published release. We solved the issue by instead listening for the release-publish event, but this is probably still a bug that needs fixed.

Referenced issue: push tags action doesn't run when publishing draft release · Issue #876 · release-drafter/release-drafter · GitHub

In the code quoted in the linked issue I can see that you use the GITHUB_TOKEN to authorize creating the release. The Using the GITHUB_TOKEN in a workflow section of the documentation explains why the workflow that’s supposed to run for new tags didn’t run in that case:

When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run.