Skip to content

Release: v0.2.0

Release: v0.2.0 #1

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
publish-pypi:
name: Publish to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.0'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build and publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
# set pyproject.toml version to github.ref_name (without v prefix)
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
sed -i 's/^version = ".*"$/version = "'"$VERSION"'"/' pyproject.toml
poetry publish --build --username=__token__ --password=$PYPI_TOKEN