Skip to content

test

test #22

Workflow file for this run

name: Build and Publish
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm i
- name: Run TypeScript compilation
run: |
npx tsc
- name: Update version (patch)
run: |
git config user.email "you@example.com"
git config user.name "you"
git add .
git commit -m "chore: update build" || echo "nothing to commit"
npm version patch
git add .
git commit -m "chore: update build" || echo "nothing to commit"
git push origin HEAD:main || echo "nothing to push, no new changes"
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_API_TOKEN }}