Skip to content

Commit 5e4e94b

Browse files
committed
fixing scripts and package.json
1 parent b91ae9a commit 5e4e94b

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/npm-publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ on:
88
types: [created]
99

1010
jobs:
11-
build:
11+
build_and_test:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: 20
1818
cache: 'npm'
19-
- run: npm install
20-
- run: npm run test
19+
- run: npm ci
2120
- run: npm run build
21+
- run: npm run test
2222

2323
publish-npm:
24-
needs: build
24+
needs: build_and_test
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
@@ -30,8 +30,9 @@ jobs:
3030
node-version: 20
3131
cache: 'npm'
3232
registry-url: https://registry.npmjs.org/
33-
- run: npm ci
34-
- run: npm run build
35-
- run: npm publish
33+
- run: npm version from-git --no-git-tag-version # update version in package.json before publishing it, but does not commit the change
34+
- run: npm install # to update package-lock.json
35+
- run: npm run build # generates dist folder
36+
- run: npm publish # publish to npm registry
3637
env:
3738
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "try-catch-finally-hooks",
33
"version": "0.0.1",
4-
"description": "",
4+
"description": "try/catch/finally interceptors for logging and error handling",
5+
"repository": "https://github.com/segmentio/try-catch-finally-hooks.js",
56
"main": "dist/index.js",
67
"types": "dist/index.d.ts",
78
"scripts": {
@@ -18,7 +19,7 @@
1819
"ts-node-dev": "^2.0.0",
1920
"typescript": "^5.4.5"
2021
},
21-
"keywords": [],
22-
"author": "",
22+
"keywords": ["proxy", "logging", "error-handling", "interceptor", "try-catch-finally", "aspect-oriented-programming"],
23+
"author": "pmunin@twilio.com",
2324
"license": "ISC"
2425
}

0 commit comments

Comments
 (0)