Skip to content

Instantly share code, notes, and snippets.

@mklueh
Last active October 7, 2020 15:38
Show Gist options
  • Save mklueh/d2a81ae107c603a8292e953f74b519e4 to your computer and use it in GitHub Desktop.
Save mklueh/d2a81ae107c603a8292e953f74b519e4 to your computer and use it in GitHub Desktop.
GitHub Action to publish node packages to the NPM repository
on: push
# Used for projects of https://overflowed.dev/projects
# place in your project under .github/workflows/npm-publish.yml
jobs:
publish-npm:
name: "Publish to NPM"
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v2
- name: "Setup Node.js"
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: "Publish NPM package"
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment