Skip to content

chore: fix release setups #1179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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