File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 commands :
99 - make check
1010 when :
11- event :
12- - pull_request
13- - tag
14- - push
11+ - event : tag
12+ ref : refs/tags/v*
13+ - event : push
14+ - event : pull_request
1515
1616- name : publish
1717 image : bash
1818 commands :
1919 - export BOT_GITHUB_TOKEN=$GITHUB_TOKEN
2020 - export PULL_BASE_REF=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)
21+ - export GIT_REPO=${CI_REPO}
22+ - export GIT_TAG=${PULL_BASE_REF}
2123 - make prepare-assets
2224 - make $([ -z $CI_COMMIT_TAG ] && echo latest-release || echo push-release)
2325 environment :
2628 secrets :
2729 - github_token
2830 when :
29- event :
30- - tag
31- - push
31+ - event : tag
32+ ref : refs/tags/v*
33+ - event : push
Original file line number Diff line number Diff line change 44GIT_REPO=$1
55
66echo " Getting latest release from $GIT_REPO "
7- RESP=$( curl -s -H " Authorization: token ${GITHUB_TOKEN} " " https://api.github.com/repos/$GIT_REPO /releases/latest" )
7+ RESP=$( curl -s -H " Authorization: token ${GITHUB_TOKEN} " " https://api.github.com/repos/$GIT_REPO /releases/tags/ latest" )
88URLS=$( echo " $RESP " | jq -r .url)
99if [ " ${URLS} " ] && [ -z " ${URLS} " ]; then
1010 echo ${RESP}
You can’t perform that action at this time.
0 commit comments