stages:
  - release

variables:
    TAG: $CI_COMMIT_TAG
    AUTH: "gitlab-ci-token:${CI_JOB_TOKEN}"
    REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/composer"

release:
    stage: release
    only:
        - tags
    except:
        - branches
    image: curlimages/curl
    script:
        - curl -s -S --fail --data tag=$TAG -u $AUTH $REGISTRY_URL
