Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 0a1ea52

Browse files
authored
Update pypipublish.yaml (#119)
1 parent 831b9a1 commit 0a1ea52

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/pypipublish.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,14 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- name: Set up Python
13-
uses: actions/setup-python@v4
14-
with:
15-
python-version: "3.x"
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
python -m pip install setuptools setuptools-scm wheel twine
20-
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24-
run: |
25-
python setup.py sdist bdist_wheel
26-
twine upload dist/*
11+
- uses: actions/checkout@v3
12+
- name: Build distributions
13+
run: |
14+
$CONDA/bin/python -m pip install build
15+
$CONDA/bin/python -m build
16+
- name: Publish a Python distribution to PyPI
17+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
18+
uses: pypa/gh-action-pypi-publish@release/v1
19+
with:
20+
user: ${{ secrets.PYPI_USERNAME }}
21+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)