diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3591688..7d166a2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,26 +11,14 @@ permissions: jobs: publish: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: 24 - cache: 'npm' - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm test - - - name: Run linter - run: npm run lint - - - name: Publish to npm - run: npm publish --access public + - uses: actions/checkout@v6 + + - uses: actions/setup-node@v6 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - run: npm publish