Skip to content

v1.0.12

v1.0.12 #41

Workflow file for this run

name: Publish Packages to NPM
on:
release:
types: [published]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
cache: "npm"
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- run: npm ci
- name: Run build
run: npm run build
- name: Verify build output
run: |
if [ ! -d "dist" ]; then
echo "Build failed: dist directory not found"
exit 1
fi
if [ ! -f "dist/index.js" ] || [ ! -f "dist/index.esm.js" ] || [ ! -f "dist/index.d.ts" ]; then
echo "Build failed: required files not found in dist"
exit 1
fi
echo "Build successful: all required files present"
- name: Bump version in package.json
run: npm run bump ${{github.ref_name}}
- name: Publish to npm
run: npm run publish:package ${{github.ref_name}} latest