From 86a1e548d096fb976fe872f5578c2c67e2537510 Mon Sep 17 00:00:00 2001 From: aria Date: Wed, 17 Aug 2022 14:21:31 +0800 Subject: [PATCH] Use official pipy to publish caraml-upi-protos (#3) Currently the generated Python package is published to test.pipy.org to test that the release pipeline is working. The tag 0.1.0.rc1 was created to test this and successfully published to test.pipy.org This PR is to publish Python package to official PiPy. --- .github/workflows/{pull-request.yaml => ci.yaml} | 8 ++++++-- .github/workflows/publish-python.yaml | 7 +++---- 2 files changed, 9 insertions(+), 6 deletions(-) rename .github/workflows/{pull-request.yaml => ci.yaml} (94%) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/ci.yaml similarity index 94% rename from .github/workflows/pull-request.yaml rename to .github/workflows/ci.yaml index 5252ee2..fa513bf 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,9 @@ -name: pull-request -on: pull_request +name: CI +on: + push: + branches: [ main ] + pull_request: + branches: [] jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/publish-python.yaml b/.github/workflows/publish-python.yaml index ba51b27..39f0829 100644 --- a/.github/workflows/publish-python.yaml +++ b/.github/workflows/publish-python.yaml @@ -17,12 +17,11 @@ jobs: pip install setuptools wheel twine - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PIPY_USERNAME_TEST }} - TWINE_PASSWORD: ${{ secrets.PIPY_PASSWORD_TEST }} + TWINE_USERNAME: ${{ secrets.PIPY_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PIPY_PASSWORD }} working-directory: ./gen/python/grpc run: | tag=$(git describe --tags --always --first-parent) sed -i -e "s|VERSION = \".*\"|VERSION = \"`echo "${tag//v}"`\"|g" ./caraml/upi/version.py python setup.py sdist bdist_wheel - # Temporary target test,pipy.org - twine upload --repository-url https://test.pypi.org/legacy/ dist/* + twine upload dist/*