Skip to content

Commit

Permalink
ci: remove scripts.postinstall in CI scripts (#130)
Browse files Browse the repository at this point in the history
* ci: remove scripts.postinstall in CI scripts
* build: remove prepublishOnly script

Signed-off-by: Rong Sen Ng (motss) <wes.ngrongsen@gmail.com>
  • Loading branch information
motss authored Nov 21, 2022
1 parent fc2c01f commit d593ffb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: ci

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'
- '**'
paths-ignore:
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
Expand All @@ -37,7 +32,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
target: [14.x, 16.x, 18.x]
target: [16.x, 18.x]

steps:
- name: Checkout
Expand Down Expand Up @@ -69,6 +64,7 @@ jobs:
- name: Install dependencies
run: |
npm pkg delete scripts.postinstall
npm ci
sh $(npm root)/@reallyland/tools/list-npx-cache.sh
Expand All @@ -86,7 +82,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
target: [14.x, 16.x, 18.x]
target: [16.x, 18.x]

steps:
- name: Checkout
Expand Down Expand Up @@ -123,6 +119,7 @@ jobs:
- name: Install dependencies
run: |
npm pkg delete scripts.postinstall
npm ci
sh $(npm root)/@reallyland/tools/list-npx-cache.sh
Expand Down Expand Up @@ -154,7 +151,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
target: [14.x, 16.x, 18.x]
target: [16.x, 18.x]

steps:
- name: Checkout
Expand Down Expand Up @@ -186,6 +183,7 @@ jobs:
- name: Install dependencies
run: |
npm pkg delete scripts.postinstall
npm ci
sh $(npm root)/@reallyland/tools/list-npx-cache.sh
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: publish

on:
push:
branches-ignore:
- '*'
tags:
- '*'
- 'v**'

defaults:
run:
Expand All @@ -25,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
target: [16.x]
target: [18.x]

steps:
- name: Checkout
Expand Down Expand Up @@ -63,8 +61,21 @@ jobs:
- name: Install dependencies
run: |
npm pkg delete scripts.postinstall
npm ci
- name: Lint
run: |
npm run lint:build
- name: Build
run: |
npm run build
- name: Cleanup package.json
run: |
npm pkg delete devDependencies nano-staged scripts
- name: Publish to npm (Prerelease)
if: contains(github.ref, '-rc') == true || contains(github.ref, '-') == true
run: |
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@
"lint-commit": "sh $(npm root)/@reallyland/tools/lint-commit.sh",
"lint:build": "sh $(npm root)/@reallyland/tools/lint-build.sh -c $(npm root)/@reallyland/tools/browser/.build.eslintrc.json",
"pre-commit": "sh $(npm root)/@reallyland/tools/pre-commit.sh",
"prepublishOnly": "npm run lint:build && npm run build",
"test": "vitest --coverage",
"ts": "tsc",
"version": "sh $(npm root)/@reallyland/tools/generate-changelogs.sh && git add *CHANGELOG.md"
},
"dependencies": {
Expand Down

0 comments on commit d593ffb

Please sign in to comment.