Skip to content

Update setup-python action #31

Update setup-python action

Update setup-python action #31

Workflow file for this run

on: push
name: CI
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
name: Python ${{ matrix.python }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install pipenv
run: python -m pip install --upgrade pipenv wheel
- name: Setup Pipenv
run: pipenv --python ${{ matrix.python }}
- name: Install pip dependencies
run: pipenv install --deploy --dev --pre
- name: Check format
run: pipenv run test-format
- name: Unit test
run: pipenv run test-unit
deploy:
needs: test
if: contains(github.ref, 'refs/tags/releases/v')
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pipenv
run: python -m pip install --upgrade twine wheel
- name: Get version
run: |
echo ${{ github.ref }} | sed 's/refs\/tags\/releases\/v//g' > VERSION
cat VERSION
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*