From 4a021176adf647f421027f0ffe58f988d36c9532 Mon Sep 17 00:00:00 2001 From: scolear Date: Mon, 22 Jul 2024 08:38:35 +0200 Subject: [PATCH] chore: adding ghwf for publishing --- .github/workflows/publish-on-release.yml | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish-on-release.yml diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml new file mode 100644 index 0000000..f750e3a --- /dev/null +++ b/.github/workflows/publish-on-release.yml @@ -0,0 +1,27 @@ +name: Build and Publish Package + +on: + release: + types: [published] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: ./.github/actions/provision + with: + node-version: '20' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build package + run: yarn build + + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}