v0.19.1 #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# NOTE: we cannot do this here, as we're on a tag and not a branch | |
#- name: Bump version | |
# run: | | |
# # set pyproject.toml version to github.ref_name (without v prefix) | |
# VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') | |
# poetry version $VERSION | |
#- name: Commit version bump | |
# run: | | |
# git config --global user.name github-actions | |
# git config --global user.email github-actions@github.com | |
# if git diff --quiet; then | |
# echo "No changes to commit" | |
# else | |
# git add pyproject.toml | |
# git commit -m "chore: bump version to $(poetry version)" | |
# git push | |
# fi | |
- name: Build | |
run: poetry build | |
- name: Publish | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: poetry publish --username=__token__ --password=$PYPI_TOKEN |