Skip to content

Commit 28492af

Browse files
committed
Update PyPI GitHub Actions workflow
1 parent 5ff3469 commit 28492af

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

.github/workflows/upload-to-pypi.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
upload:
12+
913
runs-on: ubuntu-latest
14+
1015
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python
13-
uses: actions/setup-python@v2
14-
with:
15-
python-version: "3.7"
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
python -m pip install setuptools wheel twine
20-
- name: Package project
21-
run: |
22-
python setup.py sdist bdist_wheel
23-
- name: Upload distributions
24-
env:
25-
TWINE_USERNAME: __token__
26-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
27-
run: |
28-
twine upload dist/*
16+
- uses: actions/checkout@v3
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install setuptools wheel twine
25+
- name: Package project
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
- name: Upload distributions
29+
env:
30+
TWINE_USERNAME: __token__
31+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
32+
run: |
33+
twine upload dist/*

0 commit comments

Comments
 (0)