File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 7676 command : ' bazel run //:buildifier_check ||
7777 (echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)'
7878 when : always
79+ write_release_version :
80+ docker :
81+ - image : docker:git
82+ working_directory : /src
83+ steps :
84+ - checkout
85+ - run : git describe --tags --abbrev=0 > VERSION
86+ - persist_to_workspace :
87+ root : ./
88+ paths :
89+ - VERSION
7990 build_linux_release :
8091 docker :
8192 - image : jfbrandhorst/grpc-gateway-build-env
@@ -147,13 +158,12 @@ jobs:
147158 - image : cibuilds/github:0.10
148159 steps :
149160 - attach_workspace :
150- at : ./release
151- - checkout
161+ at : /workspace
152162 - run :
153163 name : " Publish Release on GitHub"
154164 command : |
155- VERSION=$(git describe --tags --abbrev=0 )
156- ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION} . /release/
165+ VERSION=$(cat /workspace/VERSION )
166+ ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} /workspace /release/
157167workflows :
158168 version : 2
159169 all :
@@ -164,6 +174,12 @@ workflows:
164174 - generate
165175 - lint
166176 - bazel
177+ - write_release_version :
178+ filters :
179+ branches :
180+ ignore : /.*/
181+ tags :
182+ only : /^v\d+\.\d+\.\d+$/
167183 - build_linux_release :
168184 filters :
169185 branches :
@@ -184,6 +200,7 @@ workflows:
184200 only : /^v\d+\.\d+\.\d+$/
185201 - publish_github_release :
186202 requires :
203+ - write_release_version
187204 - build_linux_release
188205 - build_darwin_release
189206 - build_windows_release
You can’t perform that action at this time.
0 commit comments