Skip to content

Commit 1b8c936

Browse files
authored
Update (#1131)
1 parent ed7b638 commit 1b8c936

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

.github/workflows/pypi.yml

+36-15
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,46 @@ on:
55
types: [published]
66

77
jobs:
8-
pypi-publish:
9-
name: upload release to PyPI
8+
build:
9+
name: build
1010
runs-on: ubuntu-latest
11-
environment: pypi
12-
permissions:
13-
id-token: write
1411
steps:
15-
- uses: actions/checkout@v4
12+
- name: Clone repo
13+
uses: actions/[email protected]
1614

17-
- name: Set up Python
18-
uses: actions/setup-python@v5
15+
- name: Set up python
16+
uses: actions/setup-python@v5.5.0
1917
with:
20-
python-version: '3.9'
18+
python-version: '3.13'
19+
20+
- name: Install pip dependencies
21+
run: pip install build
2122

22-
- name: Install build tool
23-
run: python -m pip install --upgrade build
23+
- name: List pip dependencies
24+
run: pip list
25+
26+
- name: Build project
27+
run: python3 -m build
28+
29+
- name: Upload artifacts
30+
uses: actions/[email protected]
31+
with:
32+
name: pypi-dist
33+
path: dist/
2434

25-
- name: Build package
26-
run: python -m build
35+
pypi:
36+
name: pypi
37+
needs:
38+
- build
39+
permissions:
40+
id-token: write
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Download artifacts
44+
uses: actions/[email protected]
45+
with:
46+
name: pypi-dist
47+
path: dist/
2748

28-
- name: Publish package distributions to PyPI
29-
uses: pypa/gh-action-pypi-publish@release/v1
49+
- name: Publish to PyPI
50+
uses: pypa/gh-action-pypi-publish@v1.12.4

0 commit comments

Comments
 (0)