Created
January 29, 2020 05:09
-
-
Save ziazon/b7df3302f1f661fd23d8fea688e0ea28 to your computer and use it in GitHub Desktop.
Github npm package publish action
This file contains hidden or 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
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