Skip to content

Commit 0832a01

Browse files
committed
use pypa/gh-action-pypi-publish
1 parent f0f17b6 commit 0832a01

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/cd_pypi.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13+
environment:
14+
name: pypi
15+
url: https://pypi.org/project/ipinfo
16+
17+
permissions:
18+
id-token: write
19+
1320
steps:
14-
- uses: actions/checkout@v3
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
1524
- name: Set up Python
1625
uses: actions/setup-python@v4
1726
with:
1827
python-version: '3.10'
28+
1929
- name: Install dependencies
2030
run: pip install -r requirements.txt
31+
2132
- name: Build package
2233
run: python setup.py sdist bdist_wheel
34+
2335
- name: Publish package
24-
run: |
25-
pip install twine
26-
twine upload dist/*
27-
env:
28-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
36+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)