Skip to content

Commit 502dde8

Browse files
author
Tyson Williams
committed
added GitHub workflow to publish to NPM's public registry
1 parent 3c8d289 commit 502dde8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Based on template copied from https://github.com/marketplace/actions/publish-to-npm#usage
2+
name: npm-publish
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
npm-publish:
9+
name: npm-publish
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@master
14+
- name: Set up Node.js
15+
uses: actions/setup-node@master
16+
with:
17+
node-version: 12.0.0
18+
- name: Publish if version has been updated
19+
uses: pascalgn/npm-publish-action@1.3.3
20+
with: # Documentation of inputs https://github.com/marketplace/actions/publish-to-npm#inputs
21+
tag_name: "v%s"
22+
tag_message: "v%s"
23+
commit_pattern: "^Release (\\S+)"
24+
workspace: ".codedoc"
25+
env: # Documentation of environment variables https://github.com/marketplace/actions/publish-to-npm#environment-variables
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
27+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # Must be set in repo settings

0 commit comments

Comments
 (0)