blob: eec0e62ca91d8edd8b1e20c0b221e17d674b201b [file] [log] [blame]
Steve Jeong9da097d2023-03-29 18:00:05 +09001name: 'PyPI upload'
2
3#on:
4# push:
5# paths:
6# - 'setup.py'
7 workflow_dispatch:
8 inputs:
9 logLevel:
10 description: 'Log level'
11 required: true
12 default: 'warning'
13 tags:
14 description: 'release'
15
16jobs:
17 upload:
18 runs-on: ubuntu-latest
19 steps:
20 - name: 'Checkout'
21 uses: actions/Checkout@v3
22
23 - name: 'Checkout submodules'
24 run: |
25 git submodule sync
26 git submodule update --init --recursive
27
28 - name: 'Set up Python'
29 uses: actions/setup-python@v2
30 with:
31 python-version: '3.8'
32
33 - name: 'Install dependencies'
34 run: |
35 python3 -m pip install --upgrade pip
36 python3 -m pip install build
37 pip install setuptools wheel twine
38
39 - name: 'Build package'
40 run: |
41 python3 -m build
42 rm dist/*.whl
43
44 - name: 'Upload'
45 uses: pypa/gh-action-pypi-publish@release/v1
46 with:
47 user: ${{ secrets.PYPI_USER }}
48 password: ${{ secrets.PYPI_API_TOKEN }}
49 # repository-url: 'https://github.com/hardkernel/WiringPi2-Python'
50 verbose: true