Skip to content

chore: Update packaging process (#30) #67

chore: Update packaging process (#30)

chore: Update packaging process (#30) #67

Workflow file for this run

name: Python
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up pip
run: |
python -m pip install --upgrade pip
- name: Install
run: pip install '.[testing]' 'urllib3<1.27'
- name: Test with pytest
run: pytest
publish:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.event.ref, 'refs/tags/v')
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up pip
run: |
python -m pip install --upgrade pip
pip install --upgrade hatch
- name: Build
run: hatch build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.14