Skip to content

Commit

Permalink
added github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorfdl committed Jan 9, 2023
1 parent 87d7a40 commit 01b15c0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to NPM

on:
release:
types: [published]

jobs:
build:
name: "Build and Deploy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run linter
- run: npm run test
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
"analysis",
"device"
],
"engines": {
"node": ">=16.0.0",
"npm": ">=6.0.0"
},
"scripts": {
"start": "node -r @swc-node/register ./src/index.ts",
"build": "rm -rf ./out; tsc --build",
"build": "rm -rf ./build; tsc --build",
"linter": "eslint .",
"test": "jest"
},
Expand Down

0 comments on commit 01b15c0

Please sign in to comment.