Skip to content

feat: add hasChildErrors to fieldErrors #32

feat: add hasChildErrors to fieldErrors

feat: add hasChildErrors to fieldErrors #32

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
- beta
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Run typecheck
run: npm run typecheck
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Check if version has been bumped
id: version-check
run: |
VERSION=$(node -p "require('./package.json').version")
NPM_VERSION=$(npm view $(node -p "require('./package.json').name") version)
if [ "$VERSION" = "$NPM_VERSION" ]; then
echo "Version has not been bumped."
echo "bumped=false" >> $GITHUB_OUTPUT
else
echo "Version has been bumped."
echo "bumped=true" >> $GITHUB_OUTPUT
fi
- name: Build
if: steps.version-check.outputs.bumped == 'true'
run: npm run build
- name: Publish to npm
if: steps.version-check.outputs.bumped == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}