|
| 1 | +name: Maintenance Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v5.*" |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + compile: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
| 17 | + steps: |
| 18 | + - name: Checkout repo |
| 19 | + uses: actions/checkout@v4 |
| 20 | + - name: Set up python |
| 21 | + uses: actions/setup-python@v6 |
| 22 | + with: |
| 23 | + python-version: ${{ matrix.python-version }} |
| 24 | + - name: Bootstrap poetry |
| 25 | + run: | |
| 26 | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 |
| 27 | + - name: Install dependencies |
| 28 | + run: poetry install |
| 29 | + - name: Compile |
| 30 | + run: poetry run mypy src/ |
| 31 | + test: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + needs: compile |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
| 37 | + steps: |
| 38 | + - name: Checkout repo |
| 39 | + uses: actions/checkout@v4 |
| 40 | + - name: Set up python |
| 41 | + uses: actions/setup-python@v6 |
| 42 | + with: |
| 43 | + python-version: ${{ matrix.python-version }} |
| 44 | + - name: Bootstrap poetry |
| 45 | + run: | |
| 46 | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 |
| 47 | + - name: Install dependencies |
| 48 | + run: poetry install |
| 49 | + - name: Test |
| 50 | + run: poetry run pytest -rP . |
| 51 | + publish: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + needs: test |
| 54 | + steps: |
| 55 | + - name: Checkout repo |
| 56 | + uses: actions/checkout@v4 |
| 57 | + - name: Set up python |
| 58 | + uses: actions/setup-python@v6 |
| 59 | + with: |
| 60 | + python-version: "3.8" |
| 61 | + - name: Bootstrap poetry |
| 62 | + run: | |
| 63 | + curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 |
| 64 | + - name: Install dependencies |
| 65 | + run: poetry install |
| 66 | + - name: Build package |
| 67 | + run: poetry build |
| 68 | + - name: Publish to PyPI |
| 69 | + env: |
| 70 | + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} |
| 71 | + run: poetry publish |
0 commit comments