-
Notifications
You must be signed in to change notification settings - Fork 7
35 lines (34 loc) · 1.1 KB
/
pypi-publish.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
name: PyPI Publish
on:
release:
types: [published]
jobs:
build-n-pub:
strategy:
matrix:
# we are building a pure python wheel so it should work on any platform
os: [ubuntu-latest]
python-versions: [3.7]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
- name: create wheel file
run: python setup.py bdist_wheel sdist clean --all
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}