forked from gooftroop/react-image-magnify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add commit linting, semantic-release, deploy to npm and gh_p…
…ages
- Loading branch information
Brandon Webb
authored and
Brandon Webb
committed
Sep 15, 2021
1 parent
58df459
commit 066c48f
Showing
8 changed files
with
29,144 additions
and
18,366 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,21 +1,76 @@ | ||
version: 2 | ||
version: 2.1 | ||
orbs: | ||
node: circleci/node@4.7 | ||
jobs: | ||
|
||
build: | ||
working_directory: ~/react-image-magnify | ||
branches: | ||
ignore: | ||
- gh-pages | ||
docker: | ||
- image: circleci/node:15 | ||
docker: | ||
- image: node:current-buster-slim | ||
environment: | ||
NODE_ENV: development | ||
steps: | ||
- checkout | ||
- run: | ||
name: install-npm | ||
command: npm install | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
- node/install-packages | ||
- run: npm run build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./node_modules | ||
- run: | ||
name: test | ||
command: npm run test:ci | ||
- dist | ||
|
||
release: | ||
docker: | ||
- image: node:current-buster-slim | ||
environment: | ||
NODE_ENV: development | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- checkout | ||
- node/install-packages | ||
- run: npx semantic-release | ||
- run: npm run deploy-storybook -- --ci | ||
|
||
test: | ||
docker: | ||
- image: node:current-buster-slim | ||
environment: | ||
NODE_ENV: development | ||
steps: | ||
- checkout | ||
- node/install-packages | ||
- node/test: | ||
run-command: test:ci | ||
|
||
workflows: | ||
version: 2 | ||
test and release: | ||
jobs: | ||
- test: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- build: | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
- release: | ||
context: | ||
- Access Tokens | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
test and build: | ||
jobs: | ||
- test | ||
- build: | ||
requires: | ||
- test |
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 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']}; |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npx commitlint --edit $1 |
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,18 @@ | ||
**/__mocks__ | ||
**/coverage | ||
**/jest | ||
**/src | ||
**/jest.config* | ||
**/junit.xml | ||
**/tsconfig.* | ||
**/webpack.config.* | ||
**/.commitlintrc* | ||
**/.codeclimate.yml | ||
**/.eslintignore | ||
**/.eslintrc* | ||
**/.husky | ||
**/.releaserc* | ||
**/.gitattributes | ||
**/.gitignore | ||
**/.circleci | ||
**/.storybook |
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,19 @@ | ||
module.exports = { | ||
"branches": ["master"], | ||
"plugins": [ | ||
["@semantic-release/commit-analyzer", { | ||
"preset": "conventionalcommits", | ||
}], | ||
["@semantic-release/release-notes-generator", { | ||
"preset": "conventionalcommits", | ||
}], | ||
"@semantic-release/changelog", | ||
["@semantic-release/npm", { | ||
"tarballDir": "release", | ||
}], | ||
// ["@semantic-release/gitlab", { | ||
// "gitlabUrl": "https://gitlab.com/vistaprint-org/design-technology/themes", | ||
// "assets": "release/*.tgz", | ||
// }], | ||
], | ||
}; |
Oops, something went wrong.