Skip to content

Publish to Test PyPI #1

Publish to Test PyPI

Publish to Test PyPI #1

name: Publish to Test PyPI
on:
release:
types: [created]
jobs:
testpypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install Poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- name: Add Poetry to path
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Install venv
run: poetry install
- run: poetry config repositories.testpypi https://test.pypi.org/legacy/
- run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_KEY }}
- name: Create package version from Github tags
run: poetry version $(git describe --tags --abbrev=0)
- name: Poetry build
run: poetry build
- name: Publish package
run: poetry publish --build -r testpypi