Skip to content

Commit

Permalink
feat: GitHub Releases and binary uploads (#279)
Browse files Browse the repository at this point in the history
* feat: publish on master with artifacts

* feat: generate official release

* upload only with manual approval

* feat: set preid to alpha

* fix: run on tags
  • Loading branch information
XVincentX authored May 9, 2019
1 parent 7a1c073 commit 388df6d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
31 changes: 27 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,22 @@ jobs:
command: npx pkg --out-path ./cli-binaries ./packages/cli/
- store_artifacts:
path: ./cli-binaries
- persist_to_workspace:
root: ./cli-binaries
- run:
name: Publish
command: yarn lerna publish from-package --yes --dist-tag alpha


command: yarn lerna publish from-package --github-release --yes --dist-tag alpha
upload_artifacts:
docker:
- image: circleci/golang:1.8
steps:
- attach_workspace:
at: /tmp/cli-binaries
- run:
name: "Publish Release artifacts on GitHub"
command: |
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} /tmp/cli-binaries
workflows:
version: 2
build:
Expand All @@ -66,6 +77,18 @@ workflows:
- publish:
filters:
branches:
only: develop
only: master
tags:
only: /^v.*/
requires:
- build
- upload_artifacts:
type: approval
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
requires:
- build
- publish
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test.coverage": "yarn test --coverage",
"test.watch": "yarn test --watchAll",
"test.update": "yarn test.fast --updateSnapshot",
"release": "lerna version prerelease --conventional-commit"
"release": "lerna version prerelease --preid alpha --conventional-commit"
},
"resolutions": {
"jsonpath": "https://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da17"
Expand Down

0 comments on commit 388df6d

Please sign in to comment.