Gitlab: saving artifacts on protected branches only
When working with GitLab CI/CD, sometimes you want to save job artifacts only for protected branches or tags, like main or release/*, while ignoring them on feature branches. It seems simple at first, but as I found out, GitLab’s YAML rules and artifact system have some tricky limitations, especially if you need it while the […]