-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1023 Bytes
/
publish_PYPI.yaml
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
45
46
47
48
name: publish python package to PyPI
on:
release:
types: [published]
jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
- name: Clean build directories
run: |
rm -rf dist/
rm -rf build/
rm -rf *.egg-info
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Test connectivity to PyPI
run: |
curl -I https://upload.pypi.org/legacy/
- name: publish to PYPI
uses: pypa/gh-action-pypi-publish@v1.8.12
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true