Skip to content

Commit 5dd9c17

Browse files
committed
chore: fix release setups
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent f0019be commit 5dd9c17

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

.github/workflows/nodejs.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,20 @@ jobs:
103103
# cache-dependency-path: "**/package-lock.json"
104104
- name: setup project
105105
run: |
106-
echo "::group::install deps"
107-
npm i --ignore-scripts --loglevel=silly
108-
echo "::endgroup::"
106+
npm install --ignore-scripts --loglevel=silly
107+
- name: setup examples
108+
run: |
109109
echo "::group::install example javascript"
110-
npm --prefix examples/node/javascript i --ignore-scripts --loglevel=silly
110+
npm run -- dev-setup:examples:js --ignore-scripts --loglevel=silly
111111
echo "::endgroup::"
112112
echo "::group::install example typescript cjs"
113-
npm --prefix examples/node/typescript/example.cjs i --ignore-scripts --loglevel=silly
113+
npm run -- dev-setup:examples:ts-cjs --ignore-scripts --loglevel=silly
114114
echo "::endgroup::"
115115
echo "::group::install examples typescript mjs"
116-
npm --prefix examples/node/typescript/example.mjs i --ignore-scripts --loglevel=silly
116+
npm run -- dev-setup:examples:ts-mjs --ignore-scripts --loglevel=silly
117117
echo "::endgroup::"
118118
- name: setup tools
119-
run: |
120-
echo "::group::install docs-gen deps"
121-
npm --prefix tools/docs-gen i --ignore-scripts --loglevel=silly
122-
echo "::endgroup::"
123-
echo "::group::install code-style deps"
124-
npm --prefix tools/code-style i --ignore-scripts --loglevel=silly
125-
echo "::endgroup::"
119+
run: npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
126120
- name: make reports dir
127121
run: mkdir -p "$REPORTS_DIR"
128122
- name: test
@@ -509,8 +503,8 @@ jobs:
509503
echo "::group::install project"
510504
npm install --ignore-scripts --loglevel=silly
511505
echo "::endgroup::"
512-
echo "::group::install docs-gen"
513-
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
506+
echo "::group::install docs-gen deps"
507+
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
514508
echo "::endgroup::"
515509
- name: api-doc ${{ matrix.target }}
516510
run: npm run api-doc:${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
set -eux
5656
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
57-
git config --local user.name "${GITHUB_ACTOR}"
57+
git config --local user.name "${GITHUB_ACTOR}"
5858
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
5959
# see https://github.com/actions/setup-node
6060
uses: actions/setup-node@v4
@@ -100,15 +100,20 @@ jobs:
100100
node-version: ${{ env.NODE_ACTIVE_LTS }}
101101
- name: setup project
102102
run: |
103-
echo "::group::install project"
104103
npm install --ignore-scripts --include=optional --loglevel=silly
104+
- name: setup examples
105+
run: |
106+
echo "::group::install example javascript"
107+
npm run -- dev-setup:examples:js --ignore-scripts --loglevel=silly
105108
echo "::endgroup::"
106-
echo "::group::install code-style"
107-
npm --prefix tools/code-style install --ignore-scripts --loglevel=silly
109+
echo "::group::install example typescript cjs"
110+
npm run -- dev-setup:examples:ts-cjs --ignore-scripts --loglevel=silly
108111
echo "::endgroup::"
109-
echo "::group::install docs-gen"
110-
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
112+
echo "::group::install examples typescript mjs"
113+
npm run -- dev-setup:examples:ts-mjs --ignore-scripts --loglevel=silly
111114
echo "::endgroup::"
115+
- name: setup tools
116+
run: npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
112117
# no explicit npm build. if a build is required, it should be configured as prepublish/prepublishOnly script of npm.
113118
- name: login to registries
114119
run: |

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,23 @@
165165
"example": "./examples"
166166
},
167167
"scripts": {
168-
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:*",
168+
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:\\*",
169169
"dev-setup:code-style": "npm --prefix tools/code-style install",
170170
"dev-setup:docs-gen": "npm --prefix tools/docs-gen install",
171+
"dev-setup:examples": "run-p --aggregate-output -lc dev-setup:examples:\\*",
172+
"dev-setup:examples:js": "npm --prefix examples/node/javascript i --ignore-scripts",
173+
"dev-setup:examples:ts-cjs": "npm --prefix examples/node/typescript/example.cjs i --ignore-scripts",
174+
"dev-setup:examples:ts-mjs": "npm --prefix examples/node/typescript/example.mjs i --ignore-scripts",
171175
"prepublish": "npm run build",
172176
"prepublishOnly": "run-s -lc build test",
173-
"build": "run-p --aggregate-output -l build:*",
177+
"build": "run-p --aggregate-output -l build:\\*",
174178
"prebuild:node": "rimraf dist.node",
175179
"build:node": "tsc -b ./tsconfig.node.json",
176180
"prebuild:web": "rimraf dist.web",
177181
"build:web": "webpack build",
178182
"prebuild:d": "rimraf dist.d",
179183
"build:d": "tsc -b ./tsconfig.d.json",
180-
"test": "run-p --aggregate-output -lc test:*",
184+
"test": "run-p --aggregate-output -lc test:\\*",
181185
"test:node": "c8 mocha -p",
182186
"test:web": "node -e 'console.log(\"TODO: write web test\")'",
183187
"test:lint": "tsc --noEmit",

0 commit comments

Comments
 (0)