Skip to content

Commit

Permalink
chore: fix release setups (#1179)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck authored Nov 19, 2024
1 parent f0019be commit 3a31d6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@ jobs:
# cache-dependency-path: "**/package-lock.json"
- name: setup project
run: |
echo "::group::install deps"
npm i --ignore-scripts --loglevel=silly
echo "::endgroup::"
npm install --ignore-scripts --loglevel=silly
- name: setup examples
run: |
echo "::group::install example javascript"
npm --prefix examples/node/javascript i --ignore-scripts --loglevel=silly
npm run -- dev-setup:examples:js --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install example typescript cjs"
npm --prefix examples/node/typescript/example.cjs i --ignore-scripts --loglevel=silly
npm run -- dev-setup:examples:ts-cjs --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install examples typescript mjs"
npm --prefix examples/node/typescript/example.mjs i --ignore-scripts --loglevel=silly
npm run -- dev-setup:examples:ts-mjs --ignore-scripts --loglevel=silly
echo "::endgroup::"
- name: setup tools
run: |
echo "::group::install docs-gen deps"
npm --prefix tools/docs-gen i --ignore-scripts --loglevel=silly
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install code-style deps"
npm --prefix tools/code-style i --ignore-scripts --loglevel=silly
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
echo "::endgroup::"
- name: make reports dir
run: mkdir -p "$REPORTS_DIR"
Expand Down Expand Up @@ -509,8 +509,8 @@ jobs:
echo "::group::install project"
npm install --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install docs-gen"
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
echo "::group::install docs-gen deps"
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
echo "::endgroup::"
- name: api-doc ${{ matrix.target }}
run: npm run api-doc:${{ matrix.target }}
23 changes: 17 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
set -eux
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --local user.name "${GITHUB_ACTOR}"
git config --local user.name "${GITHUB_ACTOR}"
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -100,14 +100,25 @@ jobs:
node-version: ${{ env.NODE_ACTIVE_LTS }}
- name: setup project
run: |
echo "::group::install project"
npm install --ignore-scripts --include=optional --loglevel=silly
- name: setup examples
run: |
echo "::group::install example javascript"
npm run -- dev-setup:examples:js --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install example typescript cjs"
npm run -- dev-setup:examples:ts-cjs --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install code-style"
npm --prefix tools/code-style install --ignore-scripts --loglevel=silly
echo "::group::install examples typescript mjs"
npm run -- dev-setup:examples:ts-mjs --ignore-scripts --loglevel=silly
echo "::endgroup::"
- name: setup tools
run: |
echo "::group::install docs-gen deps"
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
echo "::endgroup::"
echo "::group::install docs-gen"
npm --prefix tools/docs-gen install --ignore-scripts --loglevel=silly
echo "::group::install code-style deps"
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
echo "::endgroup::"
# no explicit npm build. if a build is required, it should be configured as prepublish/prepublishOnly script of npm.
- name: login to registries
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,23 @@
"example": "./examples"
},
"scripts": {
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:*",
"dev-setup:code-style": "npm --prefix tools/code-style install",
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:\\*",
"dev-setup:docs-gen": "npm --prefix tools/docs-gen install",
"dev-setup:code-style": "npm --prefix tools/code-style install",
"dev-setup:examples": "run-p --aggregate-output -lc dev-setup:examples:\\*",
"dev-setup:examples:js": "npm --prefix examples/node/javascript i --ignore-scripts",
"dev-setup:examples:ts-cjs": "npm --prefix examples/node/typescript/example.cjs i --ignore-scripts",
"dev-setup:examples:ts-mjs": "npm --prefix examples/node/typescript/example.mjs i --ignore-scripts",
"prepublish": "npm run build",
"prepublishOnly": "run-s -lc build test",
"build": "run-p --aggregate-output -l build:*",
"build": "run-p --aggregate-output -l build:\\*",
"prebuild:node": "rimraf dist.node",
"build:node": "tsc -b ./tsconfig.node.json",
"prebuild:web": "rimraf dist.web",
"build:web": "webpack build",
"prebuild:d": "rimraf dist.d",
"build:d": "tsc -b ./tsconfig.d.json",
"test": "run-p --aggregate-output -lc test:*",
"test": "run-p --aggregate-output -lc test:\\*",
"test:node": "c8 mocha -p",
"test:web": "node -e 'console.log(\"TODO: write web test\")'",
"test:lint": "tsc --noEmit",
Expand Down

0 comments on commit 3a31d6b

Please sign in to comment.