name: Pino sentry transport

on:
  push:
    branches:
      - main

env:
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
  pino-sentry-transport:
    runs-on: ubuntu-latest

    concurrency:
      group: ${{ github.ref }}
      cancel-in-progress: true

    steps:
      - uses: actions/checkout@v3
      - uses: volta-cli/action@v4
      - run: npm ci

      - name: Dependencies audit
        run: npm audit

      - name: Build
        run: npm run build

      - name: Format check
        run: npm run format:check

      - name: Lint check
        run: npm run lint:check

      - name: Spell check
        run: npm run spell:check

      - name: Test
        run: npm run test


      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npm run semantic-release
