v0.14.2 #506
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: "Publish to PyPI" | |
on: | |
release: | |
types: | |
- "published" | |
jobs: | |
publish: | |
name: "Build & Publish" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Install Poetry" | |
uses: "snok/install-poetry@v1" | |
- uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.11" | |
cache: 'poetry' | |
# This gives us a version number without the release prefix | |
- name: "Write release version" | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: "Set the release number in pyproject.toml" | |
run: "poetry version -s $VERSION" | |
- name: "Build wheel and source tarball" | |
run: "poetry build" | |
- name: "Publish" | |
uses: "pypa/gh-action-pypi-publish@release/v1" | |
with: | |
password: "${{ secrets.PYPI_API_TOKEN }}" |