Skip to content

Commit

Permalink
Add support for publishing to npm (#4)
Browse files Browse the repository at this point in the history
* Add support for publishing to npm

* Rename release action
  • Loading branch information
pbradshawusc authored Oct 21, 2020
1 parent 7acf532 commit 0fd3e1c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Tests

on:
push:
Expand Down
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github
.env
.env.*
node_modules
tests
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "osdu-service",
"version": "0.0.1",
"name": "osdujs",
"version": "1.0.0",
"description": "Client to interact with OSDU applications",
"repository": {
"type" : "git",
"url" : "https://github.com/pariveda/osdujs.git"
},
"main": "index.js",
"scripts": {
"test": "mocha 'tests/**/*.test.js'",
Expand Down

0 comments on commit 0fd3e1c

Please sign in to comment.