Skip to content

v3.1.0-alpha

v3.1.0-alpha #9

Workflow file for this run

name: Publish Package
on:
release:
types: [created, prereleased]
jobs:
test:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install additional dependencies for coverage
run: |
pip install pytest pytest-cov
- name: Run pytest with coverage
run: |
python -m pytest -cov=pydevtools
publish:
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install twine
- name: Build distribution
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python -m twine upload --skip-existing dist/* --repository-url https://upload.pypi.org/legacy/ --username ${{ secrets.TWINE_USERNAME }} --password ${{ secrets.TWINE_PASSWORD }}