Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial TestPyPI package publishing #799

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/