comparison .repo/workflows/python-publish.yml @ 19:71d1dcfcebee default tip

Move to mercurial
author Dennis C. M. <dennis@denniscm.com>
date Tue, 03 Jun 2025 14:50:23 +0100
parents
children
comparison
equal deleted inserted replaced
18:69369e1e590e 19:71d1dcfcebee
1 name: Upload Python Package
2
3 on:
4 push:
5 tags: [ '*.*.*' ]
6
7 jobs:
8 deploy:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v2
12 - name: Set up Python
13 uses: actions/setup-python@v2
14 with:
15 python-version: '3.x'
16 - name: Install dependencies
17 run: |
18 python -m pip install --upgrade pip
19 pip install build
20 python -m pip install flake8
21 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
22 - name: Lint with flake8
23 run: |
24 # stop the build if there are Python syntax errors or undefined names
25 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
26 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
27 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
28 - name: Test
29 run: python -m unittest discover
30 - name: Build package
31 run: python -m build
32 - name: Publish package
33 uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34 with:
35 user: __token__
36 password: ${{ secrets.PYPI_API_TOKEN }}