mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
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
This commit is contained in:
parent
943211bd09
commit
d10c38bb11
2 changed files with 87 additions and 34 deletions
87
.circleci/config.yml
Normal file
87
.circleci/config.yml
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
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: /.*/
|
||||
34
circle.yml
34
circle.yml
|
|
@ -1,34 +0,0 @@
|
|||
machine:
|
||||
xcode:
|
||||
version: "9.0"
|
||||
pre:
|
||||
- mkdir ~/.yarn-cache
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- yarn config set cache-folder ~/.yarn-cache
|
||||
cache_directories:
|
||||
- ~/.yarn-cache
|
||||
override:
|
||||
- yarn
|
||||
|
||||
checkout:
|
||||
post:
|
||||
- if [[ "$CIRCLE_BRANCH" == "canary" ]]; then cp build/canary.icns build/icon.icns; fi
|
||||
|
||||
test:
|
||||
override:
|
||||
- yarn test
|
||||
|
||||
deployment:
|
||||
artifacts:
|
||||
branch: /^(?!master$).*$/
|
||||
owner: zeit
|
||||
commands:
|
||||
- yarn run dist -- -p 'never'
|
||||
- cp dist/*.zip $CIRCLE_ARTIFACTS
|
||||
release:
|
||||
tag: /.*/
|
||||
owner: zeit
|
||||
commands:
|
||||
- yarn run dist
|
||||
Loading…
Reference in a new issue