Skip to content

Commit 2663c2f

Browse files
authored
Create publish.yml
1 parent 3984bd9 commit 2663c2f

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
jobs:
8+
build:
9+
runs-on: Ubuntu-18.04
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: [3.6.8]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install sphinx
25+
pip install tox
26+
pip install sphinx_rtd_theme
27+
pip install virtualenv==20.0.1
28+
- name: Test with tox
29+
run: |
30+
tox -e py
31+
- name: Before deploy
32+
run: |
33+
pip install -e .
34+
pip install --upgrade setuptools
35+
make docs
36+
- name: Build binary wheel and a source tarball
37+
run: python setup.py sdist
38+
- name: Publish a Python distribution to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)