Skip to content

Commit 3a31d6b

Browse files
authored
chore: fix release setups (#1179)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent f0019be commit 3a31d6b

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

.github/workflows/nodejs.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,25 @@ 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
119119
run: |
120120
echo "::group::install docs-gen deps"
121-
npm --prefix tools/docs-gen i --ignore-scripts --loglevel=silly
121+
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
122122
echo "::endgroup::"
123123
echo "::group::install code-style deps"
124-
npm --prefix tools/code-style i --ignore-scripts --loglevel=silly
124+
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
125125
echo "::endgroup::"
126126
- name: make reports dir
127127
run: mkdir -p "$REPORTS_DIR"
@@ -509,8 +509,8 @@ jobs:
509509
echo "::group::install project"
510510
npm install --ignore-scripts --loglevel=silly
511511
echo "::endgroup::"
512-
echo "::group::install docs-gen"
513-
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
512+
echo "::group::install docs-gen deps"
513+
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
514514
echo "::endgroup::"
515515
- name: api-doc ${{ matrix.target }}
516516
run: npm run api-doc:${{ matrix.target }}

.github/workflows/release.yml

+17-6
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,14 +100,25 @@ 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
108+
echo "::endgroup::"
109+
echo "::group::install example typescript cjs"
110+
npm run -- dev-setup:examples:ts-cjs --ignore-scripts --loglevel=silly
105111
echo "::endgroup::"
106-
echo "::group::install code-style"
107-
npm --prefix tools/code-style install --ignore-scripts --loglevel=silly
112+
echo "::group::install examples typescript mjs"
113+
npm run -- dev-setup:examples:ts-mjs --ignore-scripts --loglevel=silly
114+
echo "::endgroup::"
115+
- name: setup tools
116+
run: |
117+
echo "::group::install docs-gen deps"
118+
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
108119
echo "::endgroup::"
109-
echo "::group::install docs-gen"
110-
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
120+
echo "::group::install code-style deps"
121+
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
111122
echo "::endgroup::"
112123
# no explicit npm build. if a build is required, it should be configured as prepublish/prepublishOnly script of npm.
113124
- name: login to registries

package.json

+8-4
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:*",
169-
"dev-setup:code-style": "npm --prefix tools/code-style install",
168+
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:\\*",
170169
"dev-setup:docs-gen": "npm --prefix tools/docs-gen install",
170+
"dev-setup:code-style": "npm --prefix tools/code-style 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)