Skip to content

Commit

Permalink
Merge pull request #799 from OpenSimulationInterface/build/python-pyp…
Browse files Browse the repository at this point in the history
…i-support

Add initial TestPyPI package publishing
  • Loading branch information
pmai authored Apr 5, 2024
2 parents 9743143 + e9385ac commit 560d23a
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
if-no-files-found: error

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

- name: Run Python Tests
run: python -m unittest discover tests

publish-python-dist:
name: Publish Python Distribution

runs-on: ubuntu-22.04

permissions:
id-token: write

needs: [build-proto2-linux64, build-proto3-linux64]

if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

steps:
- name: Download Distribution
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist/

- name: Publish Snapshot Release on TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit 560d23a

Please sign in to comment.