Skip to content

Commit

Permalink
Fix yarn prod and add GitHub Action to auto publish (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamim-khan authored May 27, 2021
1 parent 38f9c1e commit 8d3dbe1
Show file tree
Hide file tree
Showing 4 changed files with 305 additions and 276 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: NPM publish
on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14
- run: yarn install
- run: yarn build
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
check-version: true
dry-run: false
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"dev": "ts-node index.ts",
"lint": "eslint . --ext .ts",
"lint-fix": "eslint . --ext .ts --fix",
"prod": "tsc -p . && node bin/index.js"
"build": "tsc -p .",
"prod": "yarn build && node bin/index.js"
},
"devDependencies": {
"@types/figlet": "^1.2.1",
Expand Down
11 changes: 9 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@

/* Advanced Options */
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */

/* JSON Options */
"resolveJsonModule": true
},
"include": [
"./**/*",
"scrubber/**/*.json"
]
}
Loading

0 comments on commit 8d3dbe1

Please sign in to comment.