Cannot deploy from "release published" on protected environment

Hello there,

we have our environments which are protected to deploy only on certain selected branches.
On the other hand, we would like to automatically deploy when a release is published.

I have a deployment workflow which listens to this event:

on:
  release:
    types: [ published ]

Let’s say I have a production environment, which is configured to deploy only on branch main.
If I create a release with tag v1.0 on this branch for the environment production, the deploy workflow always results with this error: Branch "v1.0" is not allowed to deploy to production due to environment protection rules.

any idea please?

thanks

1 Like

I’ve run into this as well. It seems that tags will not match any of the branch rules. Is there any way we can get that added? That would really help.

1 Like