File tree 4 files changed +74
-54
lines changed
4 files changed +74
-54
lines changed Original file line number Diff line number Diff line change
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.*/
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments