Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
ci: release job (#171)
Browse files Browse the repository at this point in the history
leif asserted state
  • Loading branch information
RasPhilCo authored Jun 29, 2020
1 parent 3552bf3 commit 05d63a2
Showing 1 changed file with 38 additions and 10 deletions.
48 changes: 38 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ jobs:
docker:
- image: node:latest
working_directory: ~/cli
environment:
NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc"
steps:
- checkout
- restore_cache: &restore_cache
keys:
- v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
- v1-yarn-{{checksum ".circleci/config.yml"}}
- run: yarn
- run: yarn add -D nyc@13 @oclif/nyc-config@1
- run: |
$NYC yarn test
$NYC report --reporter text-lcov > coverage.lcov
curl -s https://codecov.io/bash | bash
- v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
- v1-npm-{{checksum ".circleci/config.yml"}}
- run:
name: Install dependencies
command: yarn
- run:
name: Run tests
command: yarn test
node-12:
<<: *test
docker:
Expand All @@ -27,6 +25,28 @@ jobs:
<<: *test
docker:
- image: node:10
release:
<<: *test
steps:
- add_ssh_keys
- checkout
- restore_cache: *restore_cache
- run:
name: Install release dependencies
command: |
yarn global add @oclif/semantic-release@3 semantic-release@17
yarn --frozen-lockfile
- run:
name: Cut release
command: |
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
semantic-release -e @oclif/semantic-release
- save_cache:
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
- /usr/local/share/.config/yarn

workflows:
version: 2
Expand All @@ -35,3 +55,11 @@ workflows:
- node-latest
- node-12
- node-10
- release:
context: org-global
filters:
branches: {only: master}
requires:
- node-latest
- node-12
- node-10

0 comments on commit 05d63a2

Please sign in to comment.