Skip to content

Commit 560d23a

Browse files
authored
Merge pull request #799 from OpenSimulationInterface/build/python-pypi-support
Add initial TestPyPI package publishing
2 parents 9743143 + e9385ac commit 560d23a

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/protobuf.yml

+25-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
if-no-files-found: error
132132

133133
- name: Upload Python Distribution
134-
if: ${{ github.event_name == 'pull_request' }}
134+
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }}
135135
uses: actions/upload-artifact@v4
136136
with:
137137
name: python-dist
@@ -224,3 +224,27 @@ jobs:
224224

225225
- name: Run Python Tests
226226
run: python -m unittest discover tests
227+
228+
publish-python-dist:
229+
name: Publish Python Distribution
230+
231+
runs-on: ubuntu-22.04
232+
233+
permissions:
234+
id-token: write
235+
236+
needs: [build-proto2-linux64, build-proto3-linux64]
237+
238+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
239+
240+
steps:
241+
- name: Download Distribution
242+
uses: actions/download-artifact@v4
243+
with:
244+
name: python-dist
245+
path: dist/
246+
247+
- name: Publish Snapshot Release on TestPyPI
248+
uses: pypa/gh-action-pypi-publish@release/v1
249+
with:
250+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)