Skip to content

Commit 5dfb465

Browse files
authored
Merge pull request #6 from Shaffer-Softworks/sickkick-patch-1
Enhance Python publish workflow for version tags
2 parents 98369cb + 4bf5370 commit 5dfb465

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Upload Python Package
33
on:
44
release:
55
types: [published]
6+
push:
7+
tags:
8+
- 'v*'
69

710
permissions:
811
contents: read
@@ -33,13 +36,6 @@ jobs:
3336
pypi-publish:
3437
runs-on: ubuntu-22.04
3538
needs: [release-build]
36-
permissions:
37-
contents: read
38-
id-token: write
39-
40-
environment:
41-
name: pypi
42-
# url: https://pypi.org/p/YOURPROJECT
4339

4440
steps:
4541
- name: Retrieve release distributions
@@ -49,6 +45,9 @@ jobs:
4945
path: dist/
5046

5147
- name: Publish release distributions to PyPI
52-
uses: pypa/gh-action-pypi-publish@release/v1
53-
with:
54-
packages-dir: dist/
48+
env:
49+
TWINE_USERNAME: __token__
50+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
51+
run: |
52+
pip install twine
53+
twine upload dist/*

0 commit comments

Comments
 (0)