Trigger on Release and Path

I would like to trigger my action if files in a certain path have been changed and if a release has been created. I have two actions of this type defined, each with different file paths. However, it seems that the path specification is getting ignored, because each time, I’m seeing both actions run on a release, even if files in a single one of the file paths was changed.

action in release_project_a.yml

on:
  release:
    types: [created]
    paths:
      - 'projects/project_a/**'

action in release_project_b.yml

on:
  release:
    types: [created]
    paths:
      - 'projects/project_b/**'

My expectation is that if I change file projects/project_b/README.txt and then create a release only the action in release_project_b.yml will be triggered. However, I’m seeing both actions getting triggered.

Hi @mhmcdonald, welcome to the GitHub Support Community! The paths keyword is only available when using the push or pull_request events. It’s not currently supported for the release event.

You’ll need to write a custom script to filter your workflow by path when using other events.