Skip to content

Commit

Permalink
Github Action to publish to NPM (#34)
Browse files Browse the repository at this point in the history
* Workflow to publish to NPM

* Tweak some workflow settings
  • Loading branch information
AaronAtDuo authored Mar 10, 2021
1 parent 94dffab commit 55d7b18
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will run tests using node and then publish a package to NPM

name: Node.js Package

on:
workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 55d7b18

Please sign in to comment.