-
Notifications
You must be signed in to change notification settings - Fork 71
30 lines (28 loc) · 872 Bytes
/
Copy pathpublish.yml
File metadata and controls
30 lines (28 loc) · 872 Bytes
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
name: Publish
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox-gh-actions wheel twine
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Create packages
run: |
python setup.py sdist bdist_wheel
- name: Check packages
run: |
twine check dist/*
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}