Skip to content

ci: improve npm publish workflow with Bun cache #2

ci: improve npm publish workflow with Bun cache

ci: improve npm publish workflow with Bun cache #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
bun-version: [latest]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun-version }}
- name: Install dependencies
run: bun install
- name: Lint
run: bun run lint:fix
- name: Type check
run: bun run type-check
- name: Run tests
run: bun test
- name: Build
run: bun run build
- name: Check build output
run: |
if [ ! -f dist/index.js ]; then
echo "Build failed: dist/index.js not found"
exit 1
fi
if [ ! -f dist/index.d.ts ]; then
echo "Build failed: dist/index.d.ts not found"
exit 1
fi