name: RELEASE

on:
  push:
    branches: [main]

jobs:
  release:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js 18
        uses: actions/setup-node@v3
        with:
          node-version: "18"
      - name: git config
        run: |
          git config user.name "${{github.actor}}"
          git config user.email "${{github.actor}}@users.noreply.github.com"
      - run: npm i
      - run: npm test
      - run: npm run release
        env:
          GITHUB_TOKEN: ${{ secrets.AT }}
