Skip to content

Commit e2722f5

Browse files
authored
Merge pull request #7 from hungdv136/publish
Publish
2 parents aca57f2 + c16c187 commit e2722f5

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: '18.x'
16+
17+
- name: npm install
18+
run: make sdk-install
19+
20+
- run: npm run build
21+
22+
- name: Publish
23+
uses: JS-DevTools/npm-publish@v1
24+
with:
25+
token: ${{ secrets.NPM_TOKEN }}
26+
package: ./sdk

sdk/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2+
"name": "rio-mock-sdk",
3+
"version": "1.0.0",
24
"scripts": {
35
"lint": "eslint . --ext .ts",
46
"format": "prettier --config .prettierrc '**/*.ts' --write",
5-
"test": "jest --coverage --coverageReporter=text-summary"
7+
"test": "jest --coverage --coverageReporter=text-summary",
8+
"build": "npx tsc"
69
},
710
"devDependencies": {
811
"@types/jest": "^29.5.2",

sdk/tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"forceConsistentCasingInFileNames": true,
77
"strictPropertyInitialization": false,
88
"strict": true,
9-
"skipLibCheck": true
10-
}
9+
"skipLibCheck": true,
10+
"outDir": "dist"
11+
},
12+
"exclude": [
13+
"**/*.spec.ts",
14+
"**/*.test.ts",
15+
"jest.config.ts"
16+
]
1117
}

0 commit comments

Comments
 (0)