Skip to content

Commit

Permalink
Add GH publish action (#13)
Browse files Browse the repository at this point in the history
* Add GH publish action

Adds an automatic npm module publish GH Action on tag.
  • Loading branch information
jpogran authored Jan 6, 2022
1 parent 3f0d2c6 commit 8ac15b9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: read node.js version
id: nodejs-version
run: |
content=`cat ./.nvmrc`
echo "::set-output name=content::$content"
- uses: actions/setup-node@v2
with:
# See https://github.com/actions/setup-node/issues/32
node-version: ${{ steps.nodejs-version.outputs.content }}
- run: npm install
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.15.1

0 comments on commit 8ac15b9

Please sign in to comment.