name: main
on: [push]
jobs:
  check-tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.10', 'pypy3.8']
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install --upgrade pip poetry
      - run: poetry install
      - run: poetry run make check-tests
  check-dev:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      - run: pip install --upgrade pip poetry
      - run: poetry install
      - run: poetry run make check-lint
      - run: poetry run make check-format
      - run: poetry run poetry build
  release:
    if: startsWith(github.ref, 'refs/tags')
    runs-on: ubuntu-latest
    needs: [check-tests, check-dev]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      - run: pip install --upgrade pip poetry
      - run: poetry run poetry build
      - uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.pypi_token }}

name: main
on: [push]
jobs:
  check-tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.10', 'pypy3.8']
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install --upgrade pip poetry
      - run: poetry install
      - run: poetry run make check-tests
  check-dev:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      - run: pip install --upgrade pip poetry
      - run: poetry install
      - run: poetry run make check-lint
      - run: poetry run make check-format
      - run: poetry build
  release:
    if: startsWith(github.ref, 'refs/tags')
    runs-on: ubuntu-latest
    needs: [check-tests, check-dev]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      - run: pip install --upgrade pip poetry
      - run: poetry build
      - uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.pypi_token }}

Remove redundant poetry run in action
Remove redundant poetry run in action
