-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.3 KB
/
deploy.yml
File metadata and controls
42 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy Workflow
on:
push:
tags:
- "*"
jobs:
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
python-version: [3.12]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: python --version
- run: |
pip install -r requirements.txt
pip install -r extra.txt
pip install --upgrade setuptools
if: matrix.python-version != '2.7'
- run: |
pip install -r requirements.py2.txt
pip install -r extra.py2.txt
pip install --upgrade setuptools
if: matrix.python-version == '2.7'
- run: |
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: |
pip install pytest
pytest
- run: python setup.py test
if: ${{ !contains(fromJson('["3.9", "3.10", "3.11", "3.12", "latest"]'), matrix.python-version) }}
- run: pip install twine wheel
- run: python setup.py sdist bdist_wheel
- run: python -m twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}