Skip to content

Commit 364c82a

Browse files
authored
Merge pull request #98 from opensource9ja/automate-npm-release
Automate npm release
2 parents 8176507 + f7e0d4a commit 364c82a

3 files changed

Lines changed: 25 additions & 30 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test and Release
2+
on: [push]
3+
4+
jobs:
5+
test-and-release:
6+
name: Run tests and release
7+
runs-on: ubuntu-18.04
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
- name: Setup Node.js
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- name: Install dependencies
16+
run: npm ci
17+
- name: Run tests
18+
run: npm test
19+
- name: Release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23+
run: npm run semantic-release

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
"xlsx": "^0.16.7"
3131
},
3232
"scripts": {
33-
"test": "yarn run bundle && karma start --single-run --browsers ChromeHeadless karma.conf.js",
33+
"test": "yarn run build && karma start --single-run --browsers ChromeHeadless karma.conf.js",
3434
"build": "babel ./danfojs/src -d ./dist --no-comments",
3535
"lint": "eslint ./danfojs/src",
3636
"bundle": "yarn run build && webpack --mode production",
3737
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
3838
"coverage": "nyc report --reporter=text-lcov | coveralls && nyc report --reporter=lcov",
3939
"patch": "npm version patch"
4040
},
41+
"publishConfig": { "access": "public", "branches": ["master"] },
4142
"repository": {
4243
"type": "git",
4344
"url": "git+https://github.com/opensource9ja/danfojs.git"

0 commit comments

Comments
 (0)