Skip to content

Merge pull request #11 from thisuxhq/add-drop-validation #56

Merge pull request #11 from thisuxhq/add-drop-validation

Merge pull request #11 from thisuxhq/add-drop-validation #56

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm cache clean --force
- run: rm -rf node_modules package-lock.json
- run: npm install
- run: npm run check
- run: npm run lint
- run: npm test
publish:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm cache clean --force
- run: rm -rf node_modules package-lock.json
- run: npm install
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}