ci-package-builder: Use $OSNAME to detect the branch prefix
Variables in regex matching rules on GitLab CI/CD are still problematic
due to https://gitlab.com/gitlab-org/gitlab/-/issues/35438, so let's use
the prepare-env
job to partially work around that issue.