Skip to content

Commit 1524e07

Browse files
committed
Publishing from the reusable workflow is officially not supported
by the pypa/gh-action-pypi-publish, so do it here.
1 parent fb08b61 commit 1524e07

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

.github/workflows/build_and_test.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,44 @@ jobs:
8080
uses: sippy/cimagic/.github/workflows/BuildPythonWheels.yml@v1
8181

8282
publish_all_wheels:
83+
runs-on: ubuntu-latest
8384
needs: build_wheels
85+
environment:
86+
name: pypi
87+
url: https://pypi.org/p/asyncproxy
8488
permissions:
8589
actions: read
8690
contents: read
8791
id-token: write
88-
uses: sippy/cimagic/.github/workflows/PublishWheels.yml@v1
89-
with:
90-
pypi_project: asyncproxy
92+
steps:
93+
- uses: actions/checkout@v4
94+
95+
- name: Download all wheel artifacts
96+
uses: actions/download-artifact@v4
97+
with:
98+
path: dist
99+
pattern: 'dist-*'
100+
merge-multiple: true
101+
102+
- name: Set up Python
103+
uses: actions/setup-python@v5
104+
with:
105+
python-version: '3.x'
106+
107+
- name: Install dependencies
108+
run: |
109+
python -m pip install --upgrade pip
110+
pip install --upgrade build setuptools wheel
111+
112+
- name: build
113+
run: python setup.py build sdist
114+
115+
- name: Show context tree
116+
run: ls -lR dist
117+
118+
- name: Publish package distributions to PyPI
119+
if: github.event_name == 'release' && github.event.action == 'published'
120+
uses: pypa/gh-action-pypi-publish@release/v1
91121

92122
roll_release:
93123
needs: publish_all_wheels

0 commit comments

Comments
 (0)