Skip to content

Commit 7d7df6d

Browse files
committed
Configure CI to publish release on Github with the final jar (#77)
* Configure CI to publish release on github with the final jar Signed-off-by: Pavol Loffay <[email protected]> * Fix formatting Signed-off-by: Pavol Loffay <[email protected]> * Fix formatting2 Signed-off-by: Pavol Loffay <[email protected]> * Update version Signed-off-by: Pavol Loffay <[email protected]>
1 parent 41a6cca commit 7d7df6d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.circleci/config.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,34 @@ jobs:
3939
steps:
4040
- setup_build_environment
4141
- run: make muzzle
42-
release-publish:
42+
43+
release-bintray-publish:
4344
docker:
4445
- image: circleci/openjdk:11.0.6-jdk-buster
4546
steps:
4647
- setup_build_environment
4748
- run: echo "Releasing version" && ./gradlew printVersion
4849
- run: ./gradlew publish
50+
- run:
51+
name: "Copy artifacts to workspace"
52+
command: |
53+
mkdir artifacts
54+
cp javaagent/build/libs/*-all.jar artifacts/hypertrace-agent-all.jar
55+
- persist_to_workspace:
56+
root: .
57+
paths:
58+
- artifacts
59+
60+
release-github-publish:
61+
docker:
62+
- image: cibuilds/github:0.13
63+
steps:
64+
- attach_workspace:
65+
at: .
66+
- run:
67+
name: "Publish Release on GitHub"
68+
command: |
69+
ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -n "Release ${CIRCLE_TAG}" -b "..." --soft ${CIRCLE_TAG} ./artifacts/
4970
5071
workflows:
5172
version: 2
@@ -59,7 +80,7 @@ workflows:
5980
filters:
6081
tags:
6182
only: /.*/
62-
- release-publish:
83+
- release-bintray-publish:
6384
context: hypertrace-publishing
6485
requires:
6586
- build
@@ -69,3 +90,12 @@ workflows:
6990
ignore: /.*/
7091
tags:
7192
only: /^[0-9]+\.[0-9]+\.[0-9]+/
93+
- release-github-publish:
94+
context: hypertrace-publishing
95+
requires:
96+
- release-bintray-publish
97+
filters:
98+
branches:
99+
ignore: /.*/
100+
tags:
101+
only: /^[0-9]+\.[0-9]+\.[0-9]+/

0 commit comments

Comments
 (0)