mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Add new circleci config
This commit is contained in:
parent
f8a80f1aa9
commit
315a374298
|
@ -6,60 +6,29 @@ jobs:
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: yarn install
|
|
||||||
- run: yarn bootstrap
|
|
||||||
- run: yarn lint
|
|
||||||
- run: yarn test
|
|
||||||
publish-stable:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:10
|
|
||||||
working_directory: ~/repo
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: yarn install
|
|
||||||
- run: yarn bootstrap
|
|
||||||
- run:
|
- run:
|
||||||
name: Saving Authentication Information
|
name: Installing dependencies
|
||||||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
command: yarn install
|
||||||
# - run:
|
|
||||||
# name: Publishing to Stable Channel
|
|
||||||
# command: yarn run lerna publish from-git --yes
|
|
||||||
|
|
||||||
publish-canary:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:10
|
|
||||||
working_directory: ~/repo
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: yarn install
|
|
||||||
- run: yarn bootstrap
|
|
||||||
- run:
|
- run:
|
||||||
name: Saving Authentication Information
|
name: Bootstrapping
|
||||||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
command: yarn bootstrap
|
||||||
- run:
|
- run:
|
||||||
name: Publishing to Canary Channel
|
name: Linting
|
||||||
command: yarn run lerna publish from-git --npm-tag canary --yes
|
command: yarn lint
|
||||||
|
- run:
|
||||||
|
name: Tests
|
||||||
|
command: yarn test
|
||||||
|
- run:
|
||||||
|
name: Potentially save npm token
|
||||||
|
command: "([[ ! -z $NPM_TOKEN ]] && echo \"//registry.npmjs.org/:_authToken=$NPM_TOKEN\" >> ~/.npmrc) || echo \"Did not write npm token\""
|
||||||
|
- run:
|
||||||
|
name: Potentially publish canary release
|
||||||
|
command: "if ls ~/.npmrc >/dev/null 2>&1 && [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --npm-tag canary --yes; else echo \"Did not publish\"; fi"
|
||||||
|
- run:
|
||||||
|
name: Potentially publish stable release
|
||||||
|
command: "if ls ~/.npmrc >/dev/null 2>&1 && [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then yarn run lerna publish from-git --yes; else echo \"Did not publish\"; fi"
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
unscheduled:
|
build-and-deploy:
|
||||||
jobs:
|
jobs:
|
||||||
- build:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
- publish-canary:
|
|
||||||
requires:
|
|
||||||
- build
|
- build
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /^.*canary.*($|\b)/
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
- publish-stable:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /^(\d+\.)?(\d+\.)?(\*|\d+)$/
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
Loading…
Reference in a new issue