Release v0.5.2 #9
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: Upload release to PyPI | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.12'] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and build | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry build | |
- name: Publish to TestPyPI | |
env: | |
USERNAME: __token__ | |
PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} | |
run: | | |
poetry config repositories.test-pypi https://test.pypi.org/legacy/ | |
poetry publish -r test-pypi -u "$USERNAME" -p "$PASSWORD" | |
- name: Publish to PyPI | |
env: | |
USERNAME: __token__ | |
PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: poetry publish -u "$USERNAME" -p "$PASSWORD" |