Multiple executor and branches+tags filters

Hello

I got this config.yml file:

version: 2.1
orbs:
  win: circleci/windows@2.4.0
jobs:
  publish-windows64:
    executor:
      name: win/default
      shell: powershell.exe
    steps:
      - checkout
      - run: npm run publish-win64
  publish-linux64:
    docker:
      - image: circleci/buildpack-deps:bionic
    steps:
      - checkout
      - run: npm run publish-linux64-circleci
workflows:
  version: 2
  publish-linux-windows:
    jobs:
      - publish-windows64:
        filters:
          tags:
            only: /^v.*/
          branches:
            ignore: /.*/
      - publish-linux64:
        filters:
          tags:
            only: /^v.*/
          branches:
            ignore: /.*/

It works fine, I mean it compiled both linux and windows perfectly but I want to only run the pipeline on tag push only. I read a lot all documentation, and I think my configuration is good, but pipeline always run on master or branch commits… :cry:

The config.yml compiler always removes the filters section on my jobs workflow:

version: 2
jobs:
  publish-windows64:
    machine:
      image: windows-server-2019-vs2019:stable
    steps:
    - checkout
    - run:
        command: npm run publish-win64
    resource_class: windows.medium
    shell: powershell.exe
  publish-linux64:
    docker:
    - image: circleci/buildpack-deps:bionic
    steps:
    - checkout
    - run:
        command: npm run publish-linux64-circleci
workflows:
  version: 2
  publish-linux-windows:
    jobs:
    - publish-windows64
    - publish-linux64

I suppose there is something wrong but i don’t figured out what. Can someone help me ?

Thank you very much

:wave: @tangb would you mind adding another level of indentation to the filters stanza of the configuration? e.g

     - publish-windows64:
         filters:
           tags:
             only: /^v.*/
           branches:
             ignore: /.*/

Indeed I forgot a level of indentation, You saved my time (after having lost more than half a day on it).

Thank you very very much for your help !! :wink:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.