Add beta deploy stage

master
Hasan Genc 4 years ago
parent 32a7a5f180
commit 86f76993f0
  1. 162
      .circleci/config.yml
  2. 2
      package.json

@ -1,81 +1,101 @@
version: 2.1 version: 2.1
defaults: &defaults defaults: &defaults
docker: docker:
- image: circleci/node:10 - image: circleci/node:10
orbs: orbs:
codecov: codecov/codecov@1.0.5 codecov: codecov/codecov@1.0.5
jobs: jobs:
test: test:
<<: *defaults <<: *defaults
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v1-dependencies-{{ checksum "package.json" }} - v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies- - v1-dependencies-
- run: npm install - run: npm install
- run: - run:
name: Run build name: Run build
command: npm run build command: npm run build
- run: - run:
name: Run tests name: Run tests
command: npm test command: npm test
- codecov/upload: - codecov/upload:
file: coverage/*.json file: coverage/*.json
- save_cache: - save_cache:
paths: paths:
- node_modules - node_modules
key: v1-dependencies-{{ checksum "package.json" }} key: v1-dependencies-{{ checksum "package.json" }}
- run: npm build - run: npm build
- persist_to_workspace: - persist_to_workspace:
root: . root: .
paths: paths:
- README.md - README.md
- CHANGELOG.md - CHANGELOG.md
- LICENSE - LICENSE
- package.json - package.json
- package-lock.json - package-lock.json
- .npmignore - .npmignore
- dist - dist
deploy: deploy:
<<: *defaults <<: *defaults
steps: steps:
- attach_workspace: - attach_workspace:
at: . at: .
- run: - run:
name: List Workspace name: List Workspace
command: ls command: ls
- run: - run:
name: Authenticate with registry name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- run: - run:
name: Publish package name: Publish package
command: npm publish --access=public command: npm publish --access=public
beta_deploy:
<<: *defaults
steps:
- attach_workspace:
at: .
- run:
name: List Workspace
command: ls
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- run:
name: Publish package
command: npm publish --access=public --tag beta
workflows: workflows:
version: 2 version: 2
test: test:
jobs: jobs:
- test
test-deploy:
jobs:
- test:
filters:
tags:
only: /^v.*/
- hold:
type: approval
requires:
- test - test
filters: test-deploy:
branches: jobs:
only: master - test:
- deploy: filters:
requires: tags:
- hold only: /^v.*/
filters: - hold:
branches: type: approval
only: master requires:
- test
filters:
branches:
only: master
- deploy:
requires:
- hold
filters:
branches:
only: master
- beta_deploy:
requires:
- hold
filters:
branches:
only: master

@ -1,6 +1,6 @@
{ {
"name": "@trendyol-js/react-carousel", "name": "@trendyol-js/react-carousel",
"version": "1.0.5", "version": "1.0.6-beta.0",
"description": "Lightweight carousel component for react", "description": "Lightweight carousel component for react",
"main": "dist/cjs/index.js", "main": "dist/cjs/index.js",
"module": "dist/es/index.js", "module": "dist/es/index.js",

Loading…
Cancel
Save