-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from TysonMN/GitHub_workflow_for_npm-publish
added GitHub workflow to publish to NPM's public registry
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Based on template copied from https://github.com/marketplace/actions/publish-to-npm#usage | ||
name: npm-publish | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
npm-publish: | ||
name: npm-publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 12.0.0 | ||
- name: Build the package | ||
run: npm run build | ||
- name: Publish if version has been updated | ||
uses: pascalgn/[email protected] | ||
with: # Documentation of inputs https://github.com/marketplace/actions/publish-to-npm#inputs | ||
tag_name: "v%s" | ||
tag_message: "v%s" | ||
commit_pattern: "^Release (\\S+)" | ||
workspace: "." | ||
env: # Documentation of environment variables https://github.com/marketplace/actions/publish-to-npm#environment-variables | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # Must be set in repo settings |