Unable to trigger by tag name ? unknown anchor referenced

I have spent 3 hours banging my head figuring out why I can’t trigger a job by it’s tag. My ideal scenario is following.

  1. I do the work on local repo
  2. I proceed to commit my work and tag them with semantic versioning (e.g. I’m tagging this commit by 1.0.5-release.
  3. I push both main branch and tag like so: git push --atomic origin main 1.0.5-release.
  4. I want drone to only build from tag 1.0.5-release and leave out main branch.

But what actually happen is, drone will not even trigger when I push the tag. This is my drone.yml

kind: pipeline
type: docker
name: publish

  depth: 1

  - name: upload
    image: plugins/docker
      registry: priv.registry.com
      repo: priv.registry.com/gugel/project
      dockerfile: docker/Dockerfile
      context: docker
      auto_tag: true
      purge: true
        from_secret: GIT_USERNAME
        from_secret: GIT_PASS
  - name: notify
    image: priv.registry.com/gugel/sendwa
        from_secret: ONESENDER_TOKEN
      wa_recipient: 12345,678901
      repo_name: DRONE_REPO_NAME
      timestamp: DRONE_BUILD_STARTED
      commit_issuer: DRONE_COMMIT_AUTHOR
      commit_message: DRONE_COMMIT_MESSAGE
      commit_url: DRONE_COMMIT_LINK

    - refs/tag/*-release
    - tag

But I also discovered something, if I change the ref property from from refs/tag/*-release to *-release only, apparently it will trigger drone to start a jobs, but it failed instantly with following error.

If anyone can shed some light to this problem, I will be very glad.