Skip to content

Instantly share code, notes, and snippets.

@ziazon
Created January 29, 2020 05:09
Show Gist options
  • Save ziazon/b7df3302f1f661fd23d8fea688e0ea28 to your computer and use it in GitHub Desktop.
Save ziazon/b7df3302f1f661fd23d8fea688e0ea28 to your computer and use it in GitHub Desktop.
Github npm package publish action
name: Build and Publish
on:
push:
branches:
- master
jobs:
github-publish:
name: Publish to Github Registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "10.x"
registry-url: https://npm.pkg.github.com/
scope: "@jubairsaidi"
- name: Publish if version has been updated
run: |
npm ci
npm run build
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment