-
Notifications
You must be signed in to change notification settings - Fork 24
44 lines (41 loc) · 1.12 KB
/
build_pypi.yml
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
43
44
name: PyPi Publish
on:
workflow_dispatch: # Manually start Publishing
push:
tags:
- "v*.*.*"
jobs:
build-pypi:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install libnotify-dev libsdl2-dev
- name: Install requirements
run: |
pip install -r requirements.txt -r requirements_build.txt
pip install -e .
- name: Run sdist
run: python setup.py sdist bdist_wheel
- name: See dist directory
run: ls dist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/esp_flasher-*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: bdist_wheel
path: dist/esp_flasher-*.whl
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}