Updated .gitlab-ci.yml
This commit is contained in:
parent
5ef3e8a08d
commit
eb0ae32b71
1 changed files with 7 additions and 5 deletions
|
@ -41,14 +41,16 @@ publish:
|
|||
stage: publish
|
||||
script:
|
||||
- |
|
||||
if [[ "$CI_COMMIT_REF_NAME" == "master" || "$CI_COMMIT_REF_NAME" == "dev" ]]; then
|
||||
PACKAGE_NAME=$CI_COMMIT_REF_NAME
|
||||
elif [[ ! -z "$CI_COMMIT_TAG" ]]; then
|
||||
if [[ ! -z "$CI_COMMIT_TAG" ]]; then
|
||||
# If this is a tagged commit, use the tag name as package name
|
||||
PACKAGE_NAME=$CI_COMMIT_TAG
|
||||
else
|
||||
PACKAGE_NAME=feature/$CI_COMMIT_REF_NAME
|
||||
# Otherwise, use the branch name as the package name
|
||||
PACKAGE_NAME=$CI_COMMIT_REF_NAME
|
||||
fi
|
||||
|
||||
|
||||
echo "Package Name: $PACKAGE_NAME"
|
||||
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||
--upload-file build/*.tar.gz \
|
||||
"https://$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/generic/$PACKAGE_NAME/$CI_PIPELINE_ID/file.tar.gz"
|
||||
|
|
Loading…
Add table
Reference in a new issue