-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from uport-project/develop
chore: new release
- Loading branch information
Showing
13 changed files
with
14,815 additions
and
11,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,129 @@ | ||
version: 2 | ||
############################################################### | ||
# References | ||
############################################################### | ||
version: 2.1 | ||
references: | ||
restore-npm-cache: &restore-npm-cache | ||
restore_cache: | ||
keys: | ||
# when lock file changes, use increasingly general patterns to restore cache | ||
- npm-packages-v1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} | ||
- npm-packages-v1-{{ checksum "package.json" }} | ||
- npm-packages-v1- | ||
|
||
save-npm-cache: &save-npm-cache | ||
save_cache: | ||
paths: | ||
- node_modules/ | ||
key: npm-packages-v1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} | ||
|
||
############################################################### | ||
# Workflows | ||
############################################################### | ||
workflows: | ||
# Trigger workflow for last commit (merge commits) to master | ||
# Run unit tests for sanity and if all looks good run semantic release | ||
# Semantic release will decide based on commit messages if another release is needed | ||
# Always run unit tests on master | ||
automatic-semantic-release: | ||
jobs: | ||
- verify-unit-tests: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- run-semantic-release: | ||
context: uport-open-automation | ||
requires: | ||
- verify-unit-tests | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
tags: | ||
# Would be good if we can ignore tagged commits but it won't trigger another build so it's fine | ||
ignore: /.*/ | ||
|
||
# This gets triggers on every push to all branches except master | ||
# It verifies the branch, runs unit tests and coverage | ||
verify-test-build: | ||
jobs: | ||
- verify-unit-tests: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
|
||
# deploy-release-tag: | ||
# jobs: | ||
# - verify-unit-tests: | ||
# filters: | ||
# tags: | ||
# only: /^v?((\d+\.))?(\d+\.)(\d+)-(dev|alpha|beta).*/ | ||
# branches: | ||
# ignore: /.*/ | ||
# - deploy-to-npm: | ||
# context: uport-open-automation | ||
# requires: | ||
# - verify-unit-tests | ||
# filters: | ||
# tags: | ||
# only: /^v?((\d+\.))?(\d+\.)(\d+)-(dev|alpha|beta).*/ | ||
# branches: | ||
# ignore: /.*/ | ||
|
||
############################################################### | ||
# Jobs | ||
############################################################### | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/did-jwt | ||
verify-unit-tests: | ||
working_directory: ~/project | ||
docker: | ||
- image: circleci/node:8 | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- dependencies-cache-{{ checksum "package.json" }} | ||
|
||
- *restore-npm-cache | ||
- run: | ||
name: install-dependencies | ||
command: | | ||
sudo npm i -g codecov node-gyp | ||
npm install | ||
- run: | ||
name: test | ||
command: npm run test:ci && codecov | ||
|
||
name: Install node modules | ||
command: npm install | ||
- *save-npm-cache | ||
- run: | ||
name: code-coverage | ||
command: bash <(curl -s https://codecov.io/bash) | ||
|
||
- save_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
name: Run unit tests | ||
command: npm run test:ci | ||
# - run: | ||
# name: Run lint | ||
# command: npm run lint | ||
- persist_to_workspace: | ||
root: ~/project | ||
paths: | ||
- ./node_modules | ||
- node_modules | ||
|
||
workflows: | ||
version: 2 | ||
build-and-deploy: | ||
jobs: | ||
- build | ||
run-semantic-release: | ||
working_directory: ~/project | ||
docker: | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- attach_workspace: | ||
at: ~/project | ||
- run: | ||
name: Semantic release | ||
command: | | ||
git config user.email $GH_EMAIL | ||
git config user.name $GH_USER | ||
npm run release | ||
# | ||
# deploy-to-npm: | ||
# working_directory: ~/project | ||
# docker: | ||
# - image: circleci/node:12 | ||
# steps: | ||
# - checkout: | ||
# path: ~/project | ||
# - attach_workspace: | ||
# at: ~/project | ||
# - run: | ||
# name: publish to npm | ||
# command: npm publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,8 @@ coverage | |
|
||
.DS_Store | ||
/.idea/ | ||
|
||
.rts2_cache_cjs | ||
.rts2_cache_es | ||
.rts2_cache_umd | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"jsxBracketSameLine": false, | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/changelog", { | ||
"changelogFile": "CHANGELOG.md" | ||
}], | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
], | ||
"branch": "master" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.