Skip to content

Commit

Permalink
actions npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Алексей Пивкин committed Dec 2, 2019
1 parent ccd9211 commit 6dcf08b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 21 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: publish npm

on:
push:
branches:
- master

jobs:
build:
name: Build job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm ci
- run: npm run build

test:
name: Testing job
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm run test
- run: npm run test:coveralls

publish-npm:
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 8
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
13 changes: 13 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on: pull_request
name: Pull Request
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm ci
- run: npm run test
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p .",
"test": "jest --no-cache",
"test:watch": "jest --watch",
"test:coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"prepublish": "tsc -p .",
"pospublish": "cd example && npm install && npm publish",
"prepublish": "npm run build",
"lint:prettier": "prettier --write",
"lint:ts": "tsc --noEmit --skipLibCheck",
"lint": "npm run lint:prettier && npm run lint:ts"
Expand Down

0 comments on commit 6dcf08b

Please sign in to comment.