Skip to content

Commit a3b780e

Browse files
committed
refactor: use reusable workflow for PyPI publishing
Simplify publish configuration by calling the centralized reusable workflow. Changes: - Replace full publish workflow with call to `pykit3/pk3/.github/workflows/python-publish-reusable.yml`
1 parent 5d6d8f8 commit a3b780e

1 file changed

Lines changed: 4 additions & 25 deletions

File tree

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
41
name: Upload Python Package
52

63
on:
@@ -9,26 +6,8 @@ on:
96
- v*
107

118
jobs:
12-
deploy:
13-
14-
runs-on: ubuntu-latest
9+
publish:
10+
uses: pykit3/pk3/.github/workflows/python-publish-reusable.yml@master
11+
secrets:
12+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
1513

16-
steps:
17-
- uses: actions/checkout@v5
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.x'
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install build twine
26-
- name: Build and publish
27-
env:
28-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30-
run: |
31-
python -m build
32-
pip install dist/*.whl
33-
python -c 'import '${GITHUB_REPOSITORY#*/}
34-
twine upload dist/*

0 commit comments

Comments
 (0)