Last active
August 22, 2020 18:34
-
-
Save Mattamorphic/792c2f1975c7f96065b9f9fc94311218 to your computer and use it in GitHub Desktop.
NPM Publish GitHub Package Registry
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
name: Deploy package to GitHub package registry | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Setup actions" | |
uses: actions/checkout@v1 | |
- name: "npm/registry setup" | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@OWNER" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: "publish package" | |
uses: actions/bin/debug@master | |
run: | | |
npm run test | |
npm run build | |
echo registry=https://npm.pkg.github.com/OWNER >> .npmrc | |
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