hyper/.circleci/config.yml
Timothy d10c38bb11 Update to CircleCI 2 (#2758)
* Initial circlci version 2 config file

* Fix step 3 structure

* Formatting

* Add run before conditional

* Storing artifacts

* Better config structure and use workflows for conditions etc.

* Potentially fix artifact upload

* Check if artifacts build which just a general path

* Finish up

* Remove test branch
2018-03-13 12:44:11 -07:00

87 lines
1.7 KiB
YAML

version: 2
jobs:
install:
macos:
xcode: "9.2.0"
working_directory: ~/repo
steps:
- checkout
- restore_cache:
key: cache-{{ checksum "yarn.lock" }}
- run:
name: Installing Dependencies
command: yarn --ignore-engines
- save_cache:
key: cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: Getting build icon
command: if [[ $CIRCLE_BRANCH == canary ]]; then cp build/canary.icns build/icon.icns; fi
- persist_to_workspace:
root: .
paths:
- node_modules
test:
macos:
xcode: "9.2.0"
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Testing
command: yarn test
build:
macos:
xcode: "9.2.0"
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Building
command: yarn dist --publish 'never'
- store_artifacts:
path: dist
- persist_to_workspace:
root: .
paths:
- dist
release:
macos:
xcode: "9.2.0"
steps:
- checkout
- run:
name: Deploying to GitHub
command: yarn dist
workflows:
version: 2
build:
jobs:
- install
- build:
requires:
- install
filters:
branches:
only:
- master
- canary
- test:
requires:
- build
- release:
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/