Updated .gitlab-ci.yml
This commit is contained in:
parent
56bfad6818
commit
7a1b337800
1 changed files with 6 additions and 10 deletions
|
@ -37,18 +37,14 @@ publish:
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
if [[ ! -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="ncc-$CI_COMMIT_TAG"
|
||||||
PACKAGE_NAME=$CI_COMMIT_TAG
|
|
||||||
else
|
else
|
||||||
# Otherwise, use the branch name as the package name
|
PACKAGE_NAME="ncc-$CI_COMMIT_REF_NAME"
|
||||||
PACKAGE_NAME=$CI_COMMIT_REF_NAME
|
|
||||||
fi
|
fi
|
||||||
|
mv build/*.tar.gz build/$PACKAGE_NAME.tar.gz
|
||||||
echo "Package Name: $PACKAGE_NAME"
|
|
||||||
|
|
||||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
--upload-file build/*.tar.gz \
|
--upload-file build/$PACKAGE_NAME.tar.gz \
|
||||||
"https://$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/generic/$PACKAGE_NAME/$CI_PIPELINE_ID/file.tar.gz"
|
"https://$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/generic/$PACKAGE_NAME/$CI_PIPELINE_ID/$PACKAGE_NAME.tar.gz"
|
||||||
only:
|
only:
|
||||||
- branches
|
- branches
|
||||||
- tags
|
- tags
|
Loading…
Add table
Reference in a new issue