31 lines
809 B
YAML
31 lines
809 B
YAML
# yamllint disable-file
|
|
# This workflows will upload a Python Package
|
|
# using Poetry when a release is created
|
|
|
|
name: Publish Python Package (test)
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Set up Poetry
|
|
uses: Gr1N/setup-poetry@v7
|
|
- name: Build and publish to PyPi
|
|
env:
|
|
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
run: |
|
|
poetry config http-basic.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }} ""
|
|
poetry build
|
|
poetry config repositories.testpypi https://test.pypi.org/legacy/
|
|
poetry publish -r testpypi
|