Skip to content

Commit af91ff3

Browse files
authored
Tech 573 Move CI to Circle CI (#313)
Move CI workflows to Circle CI
1 parent d3eaea1 commit af91ff3

File tree

4 files changed

+74
-54
lines changed

4 files changed

+74
-54
lines changed

.circleci/config.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
version: 2.1
2+
orbs:
3+
node: circleci/node@7.0.0
4+
executors:
5+
node22:
6+
docker:
7+
- image: cimg/node:22.13
8+
jobs:
9+
lint_test_build:
10+
executor:
11+
name: node22
12+
steps:
13+
- checkout
14+
- restore_cache:
15+
keys:
16+
- v1-dependencies-{{ checksum "yarn.lock" }}
17+
- v1-dependencies-
18+
- node/install-yarn
19+
- run: yarn install --frozen-lockfile
20+
- save_cache:
21+
paths:
22+
- ./node_modules
23+
key: v1-dependencies-{{ checksum "yarn.lock" }}
24+
- run: yarn run lint
25+
- run: yarn run coverage
26+
- run: yarn run build
27+
- run: yarn pack
28+
- persist_to_workspace:
29+
root: /home/circleci/project
30+
paths:
31+
- ./aion-dk-js-client-*.tgz
32+
publish:
33+
executor:
34+
name: node22
35+
steps:
36+
- attach_workspace:
37+
at: /tmp/workspace
38+
- run:
39+
name: Move files
40+
command: |
41+
mv /tmp/workspace/aion-dk-js-client-*.tgz ./
42+
- run:
43+
name: Set npm access token
44+
command: |
45+
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
46+
- run:
47+
name: Publish to NPM
48+
command: |
49+
package_file=$(ls aion-dk-js-client-*.tgz)
50+
if echo "${package_file}" | grep -E "alpha|beta" > /dev/null; then
51+
prerelease=$(echo "${package_file}" | grep -E -o "alpha|beta")
52+
echo "Publishing prerelease with tag ${prerelease} to NPM"
53+
npm publish ${package_file} --tag ${prerelease}
54+
else
55+
echo "Publishing release with to NPM"
56+
npm publish ${package_file}
57+
fi
58+
workflows:
59+
build_and_deploy:
60+
jobs:
61+
- lint_test_build:
62+
filters:
63+
branches:
64+
only: /.*/
65+
tags:
66+
only: /^v.*/
67+
- publish:
68+
requires:
69+
- lint_test_build
70+
filters:
71+
branches:
72+
ignore: /.*/
73+
tags:
74+
only: /^v.*/

.github/workflows/package.yml

-21
This file was deleted.

.github/workflows/tests.yml

-32
This file was deleted.

.npmrc

-1
This file was deleted.

0 commit comments

Comments
 (0)