Skip to content

Commit

Permalink
Add full release publication of python packages
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre R. Mai <[email protected]>
  • Loading branch information
pmai committed May 6, 2024
1 parent 5ac10b3 commit c07e102
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .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' || ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }}
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) ) }}
uses: actions/upload-artifact@v4
with:
name: python-dist
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:

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

if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) }}

steps:
- name: Download Distribution
Expand All @@ -248,3 +248,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish Full Release on PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c07e102

Please sign in to comment.