Skip to content

Commit 5b118e0

Browse files
committed
Improve github workflow
Signed-off-by: Bernd Verst <github@bernd.dev>
1 parent 55d3804 commit 5b118e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: codecov/codecov-action@v3
4646
publish:
4747
needs: build
48-
if: github.event_name != 'pull_request'
48+
if: github.event_name == 'create'
4949
runs-on: ubuntu-latest
5050
env:
5151
TWINE_USERNAME: "__token__"
@@ -60,33 +60,38 @@ jobs:
6060
python -m pip install --upgrade pip
6161
pip install setuptools wheel twine tox
6262
- name: Build and publish Dapr Python SDK
63+
if: startsWith(github.ref_name, 'v')
6364
env:
6465
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
6566
run: |
6667
python setup.py sdist bdist_wheel
6768
twine upload dist/*
6869
- name: Build and publish dapr-ext-workflow
70+
if: startsWith(github.ref_name, 'worfklow-v')
6971
env:
7072
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
7173
run: |
7274
cd ext/dapr-ext-workflow
7375
python setup.py sdist bdist_wheel
7476
twine upload dist/*
7577
- name: Build and publish Dapr Flask Extension
78+
if: startsWith(github.ref_name, 'flask-v')
7679
env:
7780
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
7881
run: |
7982
cd ext/flask_dapr
8083
python setup.py sdist bdist_wheel
8184
twine upload dist/*
8285
- name: Build and publish dapr-ext-grpc
86+
if: startsWith(github.ref_name, 'grpc-v')
8387
env:
8488
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
8589
run: |
8690
cd ext/dapr-ext-grpc
8791
python setup.py sdist bdist_wheel
8892
twine upload dist/*
8993
- name: Build and publish dapr-ext-fastapi
94+
if: startsWith(github.ref_name, 'fastapi-v')
9095
env:
9196
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
9297
run: |

0 commit comments

Comments
 (0)