v1.3.0 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}} |