Add release workflow to publish on tag push

This commit is contained in:
Kamran Ahmed
2026-06-23 09:48:04 +01:00
parent 92a1dce2f4
commit 65fc79abd1
+38
View File
@@ -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 }}