-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (34 loc) · 1006 Bytes
/
pypi-upload.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
name: Workflow for uploading to PyPI
on:
# Only published to Test-PyPI in response to push to main.
push:
branches: [main]
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: "3.9"
- name: Install dependencies
run: pip install setuptools wheel
# run: pip install build
- name: Run setup.py
run: python setup.py sdist bdist_wheel
# - name: Build the project
# run: python -m build
- name: Upload to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Upload to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}