Skip to content

Commit cfcfb9e

Browse files
committed
pkg
1 parent c8fcb39 commit cfcfb9e

File tree

4 files changed

+55
-3
lines changed

4 files changed

+55
-3
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
- run: npm install
16+
- run: npm run build

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 16
16+
- run: npm install
17+
- run: npm run build
18+
- run: |
19+
echo @lexacode:https://npm.pkg.github.com/ > build/.npmrc
20+
echo '//npm.pkg.github.com/:_authToken=${NPM_TOKEN}' >> build/.npmrc
21+
- run: npm publish
22+
working-directory: ./build
23+
env:
24+
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
2-
"name": "mahbod",
2+
"name": "@nurutomo/mahbod",
33
"version": "1.0.0",
44
"description": "Typescript WhatsApp Bot",
5+
"homepage": "https://github.com/Nurutomo/mahbod",
56
"main": "./lib/index.js",
7+
"types": "./lib/index.d.ts",
68
"scripts": {
79
"start": "node ./lib/index.js",
810
"test": "echo \"Error: no test specified\" && exit 1",
911
"prepare": "tsc",
1012
"build": "tsc"
1113
},
12-
"keywords": [],
14+
"keywords": ["whatsapp", "bot"],
1315
"author": "Nurutomo",
1416
"license": "ISC",
17+
"repository": {
18+
"url": "git@github.com:nurutomo/mahbod.git"
19+
},
1520
"dependencies": {
1621
"@adiwajshing/baileys": "github:adiwajshing/Baileys",
1722
"@adiwajshing/keyed-db": "^0.2.4",
@@ -25,5 +30,11 @@
2530
"@types/ws": "^8.5.3",
2631
"ts-node": "^10.7.0",
2732
"typescript": "^4.6.4"
28-
}
33+
},
34+
"files": [
35+
"database/*",
36+
"lib/*",
37+
"lang/*",
38+
"sessions/*"
39+
]
2940
}

0 commit comments

Comments
 (0)