Skip to content

Types Confluent Kafka 1.2.2 #11

Types Confluent Kafka 1.2.2

Types Confluent Kafka 1.2.2 #11

Workflow file for this run

name: publish
on:
release:
types:
- published
jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: install dependencies
run: |
python -m pip install --user pipx
python -m pipx ensurepath
pipx install poetry=="${poetry_version}"
poetry install
poetry show
env:
poetry_version: "1.5.1"
- name: extract tag name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: build with poetry
run: |
echo "build with release version: ${TAG_NAME}"
pipx run poetry version ${TAG_NAME} || echo "toml is already up to date."
pipx run poetry build
- name: publish to pypi
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
pipx run poetry publish -u ${PYPI_USERNAME} -p $PYPI_TOKEN
- name: update title && upload distribution to GitHub Release
run: |
gh release edit "${TAG_NAME}" --title "Types Confluent Kafka ${TAG_NAME}"
gh release upload ${TAG_NAME} dist/*
env:
GH_TOKEN: ${{ secrets.PTAH_CI_TOKEN }}