From 6ad98890891c2ff2f8c7b1daec5c424570d6fd11 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Wed, 17 Nov 2021 11:17:17 +0000 Subject: [PATCH] Add pipeline to publish to npm registry upon release publish --- .github/workflows/publish.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..968a1b6 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,28 @@ +name: Publish to npm registry + +on: + release: + types: + - published + +jobs: + publish: + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + # Setup .npmrc file to publish to GitHub Packages + - uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://npm.pkg.github.com' + + - name: NPM install + run: npm install + + - name: NPM publish + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}