Skip to content

v0.9.1

v0.9.1 #17

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.x'
- 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)
# just in case someone forgot...
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
sed -i 's/^version = ".*"$/version = "'"$VERSION"'"/' pyproject.toml
poetry publish --build --username=__token__ --password=$PYPI_TOKEN