Skip to content

Commit d793cc2

Browse files
authored
Update python-publish.yml
1 parent a418c09 commit d793cc2

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/python-publish.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
release:
1313
types: [published]
1414

15-
permissions:
16-
contents: read
17-
1815
jobs:
1916
deploy:
2017

@@ -23,17 +20,18 @@ jobs:
2320
steps:
2421
- uses: actions/checkout@v3
2522
- name: Set up Python
26-
uses: actions/setup-python@v3
23+
uses: actions/setup-python@v5
2724
with:
2825
python-version: '3.x'
2926
- name: Install dependencies
3027
run: |
3128
python -m pip install --upgrade pip
32-
pip install build
33-
- name: Build package
34-
run: python -m build
35-
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}
29+
pip install setuptools wheel twine
30+
- name: Build and publish
31+
env:
32+
TWINE_USERNAME: __token__
33+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
34+
run: |
35+
git fetch --all --tags
36+
python setup.py sdist bdist_wheel
37+
twine upload dist/*

0 commit comments

Comments
 (0)