Skip to content

v1.3.0

v1.3.0 #5

Workflow file for this run

permissions:
contents: read
name: πŸš€ release
on:
release:
types: [published]
jobs:
test:
name: ⚠ tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-node@v3
with:
node-version: 22
- run: npm install
- run: npm run build
- run: npm test
publish-npm:
name: πŸš€ release
needs: test
runs-on: ubuntu-latest
steps:
- name: πŸ“š checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: 🟒 node
uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run build
- name: πŸ” Validate build artifacts
run: |
test -f dist/index.umd.js || (echo "Missing UMD bundle" && exit 1)
test -f dist/index.umd.min.js || (echo "Missing minified UMD bundle" && exit 1)
test -f dist/index.esm.js || (echo "Missing browser ESM bundle" && exit 1)
test -f dist/index.esm.min.js || (echo "Missing minified browser ESM bundle" && exit 1)
test -f dist/index.cjs || (echo "Missing Node.js CommonJS bundle" && exit 1)
test -f dist/index.mjs || (echo "Missing Node.js ESM bundle" && exit 1)
test -f dist/index.d.ts || (echo "Missing TypeScript declarations" && exit 1)
test -f dist/cli.mjs || (echo "Missing CLI binary" && exit 1)
head -1 dist/cli.mjs | grep -q "^#!" || (echo "CLI binary missing shebang" && exit 1)
echo "βœ… All build artifacts validated"
- name: πŸ§ͺ Test build artifacts
run: npm test -- test/build-artifacts.spec.ts
- name: βœ‰οΈ publish
run: npm publish --verbose --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}