Skip to content

Commit

Permalink
❤ publish to npm automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle committed Oct 4, 2019
1 parent 3f6eb8b commit 15cf59e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ jobs:
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.github_token }}

- name: npm publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm run trypublish
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"license": "Apache-2.0",
"scripts": {
"build": "tsc",
"prepublishOnly": "tsc",
"unit-tests": "nyc mocha",
"lint": "eslint --ext .ts --ignore-path .gitignore .",
"unit-tests": "nyc mocha",
"test": "npm run lint && npm run build && npm run unit-tests",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"coverage": "nyc report --reporter=text-lcov | coveralls",
"prepublishOnly": "tsc",
"trypublish": "npm publish || true"
},
"main": "dist",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Packet from './packet';
import { multicastGroup } from './util';

export * from './util';
export { default as Packet } from './packet';

export class Receiver extends EventEmitter {
private socket: dgram.Socket;
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"module": "commonjs",
"target": "es2015",
"moduleResolution": "node",
"downlevelIteration": true
"downlevelIteration": true,
"declaration": true
},
"exclude": ["node_modules"],
"include": ["src"]
Expand Down

0 comments on commit 15cf59e

Please sign in to comment.