Skip to content

Pass dapr api token #1702

Pass dapr api token

Pass dapr api token #1702

Workflow file for this run

name: dapr-python
on:
push:
branches:
- master
- feature/*
tags:
- v*
pull_request:
branches:
- master
- release-*
- feature/*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_ver: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_ver }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_ver }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Run Linter
run: |
tox -e flake8
- name: Check Typing
run: |
tox -e type
- name: Run unit-tests
run: |
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
- name: Upload test coverage
uses: codecov/codecov-action@v3
publish:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
env:
TWINE_USERNAME: "__token__"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine tox
- name: Build and publish Dapr Python SDK
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish dapr-ext-workflow
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-workflow
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish Dapr Flask Extension
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/flask_dapr
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish dapr-ext-grpc
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-grpc
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish dapr-ext-fastapi
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-fastapi
python setup.py sdist bdist_wheel
twine upload dist/*