Skip to content

Commit 5301b6b

Browse files
committed
Modify publish workflow
1 parent ee76d66 commit 5301b6b

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,20 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install build twine
21+
pip install build
2222
2323
- name: Build package
2424
run: python -m build
2525

26-
- name: Publish to Test PyPI
27-
env:
28-
TWINE_USERNAME: __token__
29-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
30-
run: |
31-
twine upload --repository testpypi dist/*
26+
# - name: Publish to Test PyPI
27+
# uses: pypa/gh-action-pypi-publish@release/v1
28+
# with:
29+
# repository-url: https://test.pypi.org/legacy/
30+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
31+
# skip-existing: true
3232

3333
- name: Publish to PyPI
3434
if: github.event_name == 'release' && github.event.action == 'created'
35-
env:
36-
TWINE_USERNAME: __token__
37-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
38-
run: |
39-
twine upload dist/*
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)