Skip to content

Commit af86c53

Browse files
committed
Update pypi-publish.yml
1 parent 2cebb5b commit af86c53

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

.github/workflows/pypi-publish.yml

+15-22
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,28 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
8-
pypi-publish:
11+
deploy:
912
name: Upload release to PyPI
1013
runs-on: ubuntu-latest
1114
environment: release
12-
15+
1316
steps:
1417
- uses: actions/checkout@v3
1518
- name: Set up Python
16-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v3
1720
with:
18-
python-version: "3.x"
19-
20-
- name: Install pypa/build
21-
run: >-
22-
python3 -m
23-
pip install
24-
build
25-
--user
26-
- name: Build a binary wheel and a source tarball
27-
run: >-
28-
python3 -m
29-
build
30-
--sdist
31-
--wheel
32-
--outdir dist/
33-
.
34-
35-
- name: Publish distribution to PyPI
21+
python-version: '3.x'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
- name: Build package
27+
run: python -m build --sdist
28+
- name: Publish package
3629
uses: pypa/[email protected]
3730
with:
38-
password: ${{ secrets.PYPI_API_TOKEN }}
31+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)