Publish to Test PyPI #1
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 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 |