Skip to content

Commit ebdc6c6

Browse files
committed
Fix PyPi publishing
1 parent b8a65b7 commit ebdc6c6

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/python-publish.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,30 @@ on:
99

1010
jobs:
1111
deploy:
12-
12+
name: Upload release to PyPI
1313
runs-on: ubuntu-latest
14-
14+
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/urdf2webots
18+
permissions:
19+
id-token: write
1520
steps:
16-
- uses: actions/checkout@v2
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
1724
- name: Set up Python
18-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v4
1926
with:
20-
python-version: '3.8'
21-
- name: Install dependencies
27+
python-version: '3.10'
28+
29+
- name: Install build tools
2230
run: |
2331
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
32+
pip install build
33+
34+
- name: Build package
35+
run: python -m build
36+
37+
- name: Publish package distributions to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)