-
Notifications
You must be signed in to change notification settings - Fork 52
42 lines (40 loc) · 989 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
38
39
40
41
42
name: Deploy to PyPI
on:
push:
tags:
- "**"
workflow_dispatch:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build source package
run: |
pip install build
python -m build --sdist .
- name: Upload source package
uses: actions/upload-artifact@v4
with:
name: distribution
path: dist/
publish:
name: Deploy to PyPI
runs-on: ubuntu-latest
needs: [build_sdist]
steps:
- uses: actions/checkout@v2
- name: Download source package
uses: actions/download-artifact@v4
with:
name: distribution
path: dist/
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}