From 65fc79abd17104f90c3b4af276cbc82cc8440669 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 23 Jun 2026 04:18:20 +0100 Subject: [PATCH] Add release workflow to publish on tag push --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0514679 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +# Triggered by the project's existing tag style (e.g. 1.4.0) — no "v" prefix. +on: + push: + tags: + - "[0-9]*.[0-9]*.[0-9]*" + +jobs: + publish: + name: Publish to npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Test + run: pnpm test:run + + - name: Publish + run: pnpm publish --no-git-checks --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}