From 5b118e09b91e63171ff8330c169782c5403b1134 Mon Sep 17 00:00:00 2001 From: Bernd Verst Date: Mon, 27 Nov 2023 09:46:42 -0800 Subject: [PATCH] Improve github workflow Signed-off-by: Bernd Verst --- .github/workflows/build.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b8d70ff5..c7b87042 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: uses: codecov/codecov-action@v3 publish: needs: build - if: github.event_name != 'pull_request' + if: github.event_name == 'create' runs-on: ubuntu-latest env: TWINE_USERNAME: "__token__" @@ -60,12 +60,14 @@ jobs: python -m pip install --upgrade pip pip install setuptools wheel twine tox - name: Build and publish Dapr Python SDK + if: startsWith(github.ref_name, 'v') env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | python setup.py sdist bdist_wheel twine upload dist/* - name: Build and publish dapr-ext-workflow + if: startsWith(github.ref_name, 'worfklow-v') env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | @@ -73,6 +75,7 @@ jobs: python setup.py sdist bdist_wheel twine upload dist/* - name: Build and publish Dapr Flask Extension + if: startsWith(github.ref_name, 'flask-v') env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | @@ -80,6 +83,7 @@ jobs: python setup.py sdist bdist_wheel twine upload dist/* - name: Build and publish dapr-ext-grpc + if: startsWith(github.ref_name, 'grpc-v') env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | @@ -87,6 +91,7 @@ jobs: python setup.py sdist bdist_wheel twine upload dist/* - name: Build and publish dapr-ext-fastapi + if: startsWith(github.ref_name, 'fastapi-v') env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: |