-
Notifications
You must be signed in to change notification settings - Fork 17
40 lines (38 loc) · 1.08 KB
/
build-publish-to-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
name: Python PyPI Builder and Publisher
on:
release:
types: [published]
jobs:
build-publish:
name: Builds and publishes a Python-based distribution to PyPI
runs-on: ubuntu-18.04
steps:
- name: Checks the Branch
# Uses the master branch of the current repository
uses: actions/checkout@master
- name: Sets the Environment
# Installs a Python 3.7 environment
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Installs pypa/build
# Install the `build` package for further building
run: >-
python -m
pip install
build
--user
- name: Builds the Wheel
# Runs the `build` command to create the wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publishes to PyPI
# Publishes the builded package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}