Skip to content

Publish to Test PyPI #2

Publish to Test PyPI

Publish to Test PyPI #2

Workflow file for this run

name: Publish to Test PyPI
on:
workflow_dispatch:
inputs:
PYTHON_VERSION:
description: "Python Version"
required: false
default: "3.12.2"
POETRY_VERSION:
description: "The version of Poetry to use"
required: false
default: "1.8.2"
RELEASE_TAG:
description: "The new version should be a valid PEP 440 string"
required: true
default: "0.3.0"
defaults:
run:
working-directory: ./tools
jobs:
test_pypi_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pip install poetry==${{ inputs.POETRY_VERSION }}
shell: bash
- name: Set up Python ${{ inputs.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.PYTHON_VERSION }}
- run: poetry version ${{ inputs.RELEASE_TAG }}
- run: poetry install
- run: poetry config repositories.testpypi https://test.pypi.org/legacy/
- run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
- name: Publish package
run: poetry publish --build -r testpypi