From 13e9603a7c47e047f1510ab142ba6ade08dabaa8 Mon Sep 17 00:00:00 2001 From: Vitali Bahdzevich Date: Tue, 5 May 2026 21:54:17 +0300 Subject: [PATCH] feat: add publish workflow for npmjs --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c0fcfdd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Publish to npm + run: npm publish --access public