summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
author杨威 <[email protected]>2019-05-21 19:07:44 +0800
committer杨威 <[email protected]>2019-05-21 19:07:44 +0800
commit3d6bfc49d4496ef8799080d1889f35519fdc0e4a (patch)
tree32dcb29c48168d3fb29902282b2ca24630070ec9 /.gitlab-ci.yml
parent0916cce3120173febae777773b4ed29dcea424b1 (diff)
Update .gitlab-ci.yml
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a94ee2a..8f08f97 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,8 +5,11 @@ stages:
#- package
- release
+
build:
stage: build
+ variables:
+ artifacts_job_name: $CI_JOB_NAME
script:
- mkdir -p build
- cd build
@@ -26,7 +29,7 @@ build:
- ./build/*.rpm
.post_release_script: &post_release_script |
- echo -e "curl --header 'Content-Type: application/json' --header \"PRIVATE-TOKEN: ToRuds-b9AW2mgLH9-cX \" --data '{ \"name\": \"$CI_COMMIT_TAG.zip\", \"tag_name\": \"$CI_COMMIT_TAG\", \"description\": \"$CI_COMMIT_TAG release\", \"assets\": { \"links\": [{ \"name\": \"$CI_PROJECT_NAME_$CI_COMMIT_TAG.zip\", \"url\": \"$CI_JOB_URL/artifacts/$CI_COMMIT_TAG/download?job=build\" }] } }' --request POST $CI_API_V4_URL/projects/$CI_PROJECT_ID/releases/"""| /bin/bash
+ echo -e "curl --header 'Content-Type: application/json' --header \"PRIVATE-TOKEN: ToRuds-b9AW2mgLH9-cX \" --data '{ \"name\": \"$CI_COMMIT_TAG.zip\", \"tag_name\": \"$CI_COMMIT_TAG\", \"description\": \"$CI_COMMIT_TAG release\", \"assets\": { \"links\": [{ \"name\": \"$CI_PROJECT_NAME_$CI_COMMIT_TAG.zip\", \"url\": \"$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_TAG/download?job=$artifacts_job_name\" }] } }' --request POST $CI_API_V4_URL/projects/$CI_PROJECT_ID/releases/"""| /bin/bash
release:
stage: release
tags: