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
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?