GitHub Action trigger "on push tag" not working as expected

Hello guys, I’m Paolo and this is my first topic.

I’m collaborating as Maintainer on the following repository, which is part of the italia organization.

I defined a workflow to be triggered when a push occurs on the main branch or a new tag, named as v* (e.g. v1.2.3), is pushed. Here the workflow source

In my understanding, when a new release is published a new tag is created (and pushed). Despite this, the workflow is not executed as expected. On the contrary, the workflow runs as expected when a push occurs on main branch.

To be sure, I replicated the scenario on a test repository (owned by me and hosted on my space) and everything worked as expected. The workflow runs “on tag creation” and "push on main".

Any ideas? Is the Maintainer role not enough to perform what I’m trying to do? Thanks!

Hello guys, I think I found the problem…

I use release-drafter action to draft new releases and I configured it in order to use the default repository GITHUB_TOKEN (secrets.GITHUB_TOKEN).

According to GitHub documentation “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 […] If you would like to trigger a workflow from a workflow run, you can trigger the event using a personal access token.”.

So, I replaced the secrets.GITHUB_TOKEN with a personal access token and everything started working as expected.