Skip to content

Commit cbfbdd1

Browse files
authored
ci: update pypi
1 parent 181e081 commit cbfbdd1

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.github/workflows/pypi.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,43 @@
1-
name: "📦 PyPI "
1+
name: Deploy to PYPI
2+
23
on:
34
workflow_dispatch:
4-
55
jobs:
6-
make_sdist:
7-
name: Make SDist
6+
7+
sdist:
8+
name: Build sdist
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v4
11-
12-
- name: Build SDist
12+
- uses: actions/setup-python@v5
13+
- name: Install dependencies
1314
run: |
15+
python -m pip install --upgrade pip
1416
pip install build
15-
python -m build
16-
17+
- name: Build sdist
18+
run: python -m build --sdist
1719
- uses: actions/upload-artifact@v4
1820
with:
1921
name: dist
20-
path: dist/
21-
22-
upload_to_pypi:
23-
needs: ["make_sdist"]
24-
runs-on: "ubuntu-latest"
22+
path: ./dist/*.tar.gz
2523

24+
publish:
25+
name: Publish wheels to pypi
26+
runs-on: ubuntu-latest
27+
permissions:
28+
# IMPORTANT: this permission is mandatory for trusted publishing
29+
id-token: write
30+
needs: sdist
2631
steps:
2732
- uses: actions/download-artifact@v4
2833
with:
2934
name: dist
3035
path: dist
36+
- name: copy to wheelhouse
37+
run: |
38+
# cp -r wheelhouse/*/*.whl dist
3139
- uses: pypa/gh-action-pypi-publish@release/v1
3240
with:
33-
skip_existing: true
41+
skip-existing: true
3442
verbose: true
35-
user: ${{ secrets.PYPI_USERNAME }}
36-
password: ${{ secrets.PYPI_PASSWORD }}
43+
packages-dir: dist/

0 commit comments

Comments
 (0)