Github action is not triggered on tag push

Hello there. I have repository with workflow configuration as follows:

name: test

on: 
  push: 
    tags: 
      - '*'

jobs:
  linux_build:
    runs-on: ubuntu-latest
    steps:
      - name: Build
        run: echo test

I execute following commands:

git tag 1.0.11 master
git push origin 1.0.11

A new tag is created, but workflow is not running.

Your git tag command doesn’t do what you intend. The form you used creates a lightweight tag “meant for private or temporary object labels.” To trigger an action, you need an annotated tag “meant for release”. Annotated tags are annotated with the tagger’s name, email, a tagging message and an optional GnuPG signature, all of which helps me remember the difference!

To create an annotated tag:

git tag -a -m "Patch brillig and slithy toves" 1.0.11

Then push as you did and it should work.

Thanks, I never heard of annotated tags before! However, upon retesting, it appears that the original command works and starts the workflow too. Perhaps this was fixed by the github team at some point