Skip to content

feat(pixel-grid): Add 4x4 and 6x6 grid dimensions with static mode #64

feat(pixel-grid): Add 4x4 and 6x6 grid dimensions with static mode

feat(pixel-grid): Add 4x4 and 6x6 grid dimensions with static mode #64

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
paths:
- 'components/**'
- 'lib/**'
- 'package.json'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build:lib
- name: Check if version exists
id: check
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
PACKAGE_NAME=$(node -p "require('./package.json').name")
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version 2>/dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Publish to npm
if: steps.check.outputs.exists == 'false'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}