@@ -5,7 +5,7 @@ version: 2.1
55orbs :
66 # `oss` is a local reference to the package. The source for Apollo Orbs can
77 # be found at http://github.com/apollographql/CircleCI-Orbs.
8- oss : apollo/oss-ci-cd-tooling@0.0.8
8+ oss : apollo/oss-ci-cd-tooling@0.0.9
99 # win is a windows orb provided by circleci
1010 win : circleci/windows@2.0.0
1111
7979 - oss/npm_clean_install_with_caching
8080 - run : npm run publish-extension
8181
82+
83+ Publish GitHub Release :
84+ docker :
85+ - image : circleci/golang:latest
86+ steps :
87+ - attach_workspace :
88+ # Must be absolute path or relative path from working_directory
89+ at : .
90+ - checkout
91+ - run :
92+ name : " Publish Release on GitHub"
93+ command : |
94+ set +e
95+ test -d oclif-dist/channels && exit 1 || "Not a pre-release, continuing with publishing"
96+ go get github.com/tcnksm/ghr
97+ VERSION=$(ls oclif-dist | cut -d 'v' -f2)
98+ echo "Publishing apollo@${VERSION} to GitHub Releases using ghr"
99+ echo "ghr -t ${GH_TOKEN} -c ${CIRCLE_SHA1} -delete apollo@${VERSION} ./oclif-dist/apollo-v${VERSION}/"
100+ ls ./oclif-dist/apollo-v${VERSION}/
101+ ghr -t ${GH_TOKEN} -c ${CIRCLE_SHA1} -delete apollo@${VERSION} "./oclif-dist/apollo-v${VERSION}/"
102+
82103 Test VSCode :
83104 executor : { name: oss/node }
84105 steps :
@@ -189,6 +210,10 @@ workflows:
189210 - NodeJS 12 Windows
190211 - Test VSCode
191212 - Build VSCode
213+ - Publish GitHub Release :
214+ << : *common_publish_filters
215+ requires :
216+ - Build CLI
192217 - oss/dry_run :
193218 name : Dry-run
194219 << : *common_publish_filters
@@ -213,3 +238,5 @@ workflows:
213238 << : *common_publish_filters
214239 requires :
215240 - Confirmation
241+
242+
0 commit comments