From dd4da933ad2cec55124e2f7b42181051c352abc3 Mon Sep 17 00:00:00 2001 From: bd82 Date: Tue, 16 Feb 2021 11:25:42 +0200 Subject: [PATCH 1/2] ci: circle CI voter and release jobs --- .circleci/config.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 5 +++- CONTRIBUTING.md | 11 ++++++++- package.json | 2 ++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..765abedf0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,57 @@ +version: 2.1 +jobs: + build-node14: + docker: + - image: circleci/node:14-browsers + working_directory: ~/repo + steps: + - checkout + - run: yarn + - run: yarn run ci + + build-node12: + docker: + - image: circleci/node:12-browsers + working_directory: ~/repo + steps: + - checkout + - run: yarn + - run: yarn run ci + + build-node10: + docker: + - image: circleci/node:10-browsers + working_directory: ~/repo + steps: + - checkout + - run: yarn + - run: yarn run ci + + deploy-npm: + docker: + - image: circleci/node:14-browsers + working_directory: ~/repo + steps: + - checkout + - run: yarn --pure-lockfile + - run: yarn run ci + - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + # To help debug when lerna detects changes to the working tree and fails the publish + - run: git status + - run: yarn run release:publish + +workflows: + version: 2 + voter: + jobs: + - build-node10 + - build-node12 + - build-node14 + release: + jobs: + - deploy-npm: + filters: + tags: + only: /^v[0-9]+(\.[0-9]+)*/ + branches: + ignore: /.*/ diff --git a/.gitignore b/.gitignore index 15dac4052..b285e1f0d 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,7 @@ typings/ # build artifacts lib tsconfig.tsbuildinfo -.rollup.cache \ No newline at end of file +.rollup.cache + +# jetbrains +.idea \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b35f69d57..4e849bdf2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,4 +11,13 @@ Our goal is to build a unique and welcoming community around this project. Code ### On the details of contributing -As far as code style, repo management, tools, etc, ehh we can figure that out! Don't sweat it. Ask questions, and when you find answers, do your best to fill in any gaps in code documentation and in the Docusaurus docs, so that the next person doesn't encounter the same gaps. \ No newline at end of file +As far as code style, repo management, tools, etc, ehh we can figure that out! Don't sweat it. Ask questions, and when you find answers, do your best to fill in any gaps in code documentation and in the Docusaurus docs, so that the next person doesn't encounter the same gaps. + +### Release Process +Performing a release requires push permissions to the repository. + +- Ensure you are on the master branch and synced with origin. +- yarn run release:version +- Follow the lerna CLI instructions and choose the new version number. +- Track the newly pushed tag (/^v[0-9]+(\.[0-9]+)*/) build in the build system until successful completion. +- Inspect the new artifacts published on npmjs.com, e.g: \ No newline at end of file diff --git a/package.json b/package.json index 4280e8fdb..4b5727c22 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,8 @@ "typescript": "^4.0.3" }, "scripts": { + "release:version": "lerna version", + "release:publish": "lerna publish from-git --yes", "ci": "lerna run ci && yarn run lint", "lint:fix": "eslint --fix '**/*.{ts,json}'", "lint": "eslint '**/*.{ts,json}'", From 87ef52d9e249aa0d1da5dcb9833a52a9895d48d8 Mon Sep 17 00:00:00 2001 From: bd82 Date: Tue, 16 Feb 2021 11:31:56 +0200 Subject: [PATCH 2/2] ci: drop node 10 voter as it will soon reach EOL --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 765abedf0..c31c2d60d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,26 @@ version: 2.1 jobs: - build-node14: + build-node15: docker: - - image: circleci/node:14-browsers + - image: circleci/node:15-browsers working_directory: ~/repo steps: - checkout - run: yarn - run: yarn run ci - build-node12: + build-node14: docker: - - image: circleci/node:12-browsers + - image: circleci/node:14-browsers working_directory: ~/repo steps: - checkout - run: yarn - run: yarn run ci - build-node10: + build-node12: docker: - - image: circleci/node:10-browsers + - image: circleci/node:12-browsers working_directory: ~/repo steps: - checkout @@ -44,9 +44,9 @@ workflows: version: 2 voter: jobs: - - build-node10 - build-node12 - build-node14 + - build-node15 release: jobs: - deploy-npm: