Skip to content

Commit

Permalink
Update build and release script
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyakan committed Dec 18, 2018
1 parent 6218550 commit e1dccba
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,36 @@ jobs:
path: ./dist
destination: build

release:
build-and-release:
docker:
- image: circleci/golang:1.11-node
working_directory: /go/src/github.com/Brightscout/mattermost-plugin-boilerplate
steps:
- checkout
- restore_cache:
name: Restore Golang dependencies cache
key: dependency-cache-{{ checksum "./server/glide.lock" }}
- restore_cache:
name: Restore NPM dependencies cache
key: dependency-cache-{{ checksum "./webapp/package-lock.json" }}
- type: shell
name: 'Build artifacts'
command: make dist
environment:
TERM: dumb
- run:
name: Test
command: make test
- save_cache:
name: Save Golang dependencies cache
key: dependency-cache-{{ checksum "./server/glide.lock" }}
paths:
- ./server/vendor
- save_cache:
name: Save NPM dependencies cache
key: dependency-cache-{{ checksum "./webapp/package-lock.json" }}
paths:
- ./webapp/node_modules
- run: go get -u github.com/tcnksm/ghr
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/

Expand All @@ -58,15 +82,7 @@ workflows:
ignore: /.*/
build-and-release:
jobs:
- build:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
- release:
requires:
- build
- build-and-release:
filters:
branches:
ignore: /.*/
Expand Down

0 comments on commit e1dccba

Please sign in to comment.