File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 29
29
name : " npm-package"
30
30
path : release-npm-package
31
31
32
+ # NOTE@jsjoeio - we need to make sure we're using
33
+ # v7 or higher of the npm CLI because it's used
34
+ # in the yarn publish:npm script in development builds
35
+ # to modify package.json name.
36
+ - name : Install Node & npm v8
37
+ uses : actions/setup-node@v3
38
+ with :
39
+ node-version : " 16.14.0"
40
+
32
41
- name : Publish npm package and tag with "latest"
33
42
run : yarn publish:npm
34
43
env :
Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ main() {
51
51
exit 1
52
52
fi
53
53
54
+ # TODO@jsjoeio
55
+ # Check that we're using at least v7 of npm CLI
56
+ if ! command -v npm & > /dev/null; then
57
+ echo " npm v7 or higher could not be found."
58
+ echo " We use this to modify the package.json name for dev builds."
59
+ echo " Please upgrade and re-run the script."
60
+ exit 1
61
+ fi
62
+
54
63
# This allows us to publish to npm in CI workflows
55
64
if [[ ${CI-} ]]; then
56
65
echo " //registry.npmjs.org/:_authToken=${NPM_TOKEN} " > ~ /.npmrc
@@ -122,6 +131,7 @@ main() {
122
131
fi
123
132
124
133
echo " using tag: $NPM_TAG "
134
+ echo " using package name: $PACKAGE_NAME "
125
135
126
136
# We modify the version in the package.json
127
137
# to be the current version + the PR number + commit SHA
You can’t perform that action at this time.
0 commit comments