Skip to content

v0.18.0

v0.18.0 #12

Workflow file for this run

# This workflows will upload a Python Package using Poetry when a release is created
name: Publish Package
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
name: "Publish library"
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0
- name: Setup Python Env
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: pip install poetry dunamai
- name: Set version
run: |
VERSION=$(dunamai from any --no-metadata --style pep440)
poetry version $VERSION
echo "__version__ = \"$VERSION\"" > aioreactive/_version.py
- name: Build package
run: poetry build
- name: Release to PyPI
run: |
poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} || echo 'Version exists'