From b2a50237a9f71460e18d5b557f1d2ac293c7cf2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 5 Dec 2024 12:57:57 +0100 Subject: [PATCH] chore: add github workflow to publish package to npm --- .github/workflows/publish-to-npm.yaml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish-to-npm.yaml diff --git a/.github/workflows/publish-to-npm.yaml b/.github/workflows/publish-to-npm.yaml new file mode 100644 index 0000000..2775b6b --- /dev/null +++ b/.github/workflows/publish-to-npm.yaml @@ -0,0 +1,33 @@ +name: Build and publish new version of @intersect.mbo/pdf-ui package +run-name: Publish by @${{ github.actor }} + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + defaults: + run: + working-directory: pdf-ui + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + scope: "@intersect.mbo" + + - name: Install dependencies + run: npm ci + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}