From d7338a019e61571f72b5caadf7a2a81c5c36469b Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Wed, 10 Jul 2024 14:22:34 +0300 Subject: [PATCH] feat: add ci pipeline to publish to npm on release --- .github/workflows/hopp-publish.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/hopp-publish.yml diff --git a/.github/workflows/hopp-publish.yml b/.github/workflows/hopp-publish.yml new file mode 100644 index 000000000..87d43b6f7 --- /dev/null +++ b/.github/workflows/hopp-publish.yml @@ -0,0 +1,26 @@ +name: Publish Package to NPM + +on: + release: + types: [published] + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - run: npm install + + - name: Publish package + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_ACCESS_TOKEN }}