stage:prepare# This stage must run before the release stage
rules:
-if:$CI_COMMIT_TAG# Run this job when a tag is created manually
script:
-echo "VERSION_DIR=v$(echo $CI_COMMIT_TAG | cut -f1 -d'.')" >> variables.env# Generate the VERSION_DIR environment variable and append to the variables.env file
artifacts:
reports:
dotenv:variables.env# Use artifacts:reports:dotenv to expose the variables to other jobs