language: python

sudo: false
dist: xenial

cache:
  pip: true
  directories:
    - $HOME/.cache/pypoetry

install:
  - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
  - source $HOME/.poetry/env
  - poetry install

script:
  - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot
  - poetry run black --check nbtlib tests examples

jobs:
  include:
    - python: 3.8

    - stage: publish
      python: 3.8
      if: tag IS present
      script:
        - poetry build
        - poetry publish --username="__token__" --password="$PYPI_TOKEN"

language: python

dist: focal

cache:
  pip: true
  directories:
    - $HOME/.cache/pypoetry

install:
  - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
  - source $HOME/.poetry/env
  - poetry install

script:
  - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot
  - poetry run black --check nbtlib tests examples

jobs:
  include:
    - python: 3.8

    - stage: publish
      python: 3.8
      if: tag IS present
      script:
        - poetry build
        - poetry publish --username="__token__" --password="$PYPI_TOKEN"

Change dist and poetry install url
Change dist and poetry install url
