-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (30 loc) · 1005 Bytes
/
deploy.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
name: Package Builds
on: push
jobs:
build-n-publish:
name: Build and publish packages to PyPI and TestPyPI
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install python packages
run: pip install setuptools
- name: Build package
run: python setup.py sdist
- name: Publish to test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to tagged release to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}