name: Deploy Workflow
on:
  push:
    tags:
      - "*"
jobs:
  build:
    name: Deploy
    strategy:
      matrix:
        node-version: [16]
    runs-on: ubuntu-latest
    container: node:${{ matrix.node-version }}
    steps:
      - uses: actions/checkout@v4
      - run: node --version
      - run: npm install
      - run: npm install --only=dev
      - run: npm run lint
      - run: npm test
      - run: |
          echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
          npm publish
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
