Files
tiny-pattern-ts/.github/workflows/ci.yml
2025-04-29 13:43:47 +02:00

50 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run check
- run: npm run test:ci
- run: npm run check:outdated
- run: npm run check:cspell
- run: npm run check:tsc
- run: npm run check:eslint
- run: npm run check:prettier
- run: npm run check:package
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}