Build and publish choice-learn on PyPI #3
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: Build and publish choice-learn | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
publish-service-client-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish choice-learn on TestPyPI | |
uses: code-specialist/pypi-poetry-publish@v1 | |
with: | |
PACKAGE_DIRECTORY: "./choice_learn/" | |
PYTHON_VERSION: "3.8" | |
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | |
PUBLISH_REGISTRY: "https://test.pypi.org/simple/" | |
- name: Install from TestPyPI & run tests with installed package | |
run: | | |
pip uninstall -y -r <(pip freeze) | |
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ choice-learn | |
python tests/manual_run.py | |
- name: publish to PyPI | |
uses: code-specialist/pypi-poetry-publish@v1 | |
with: | |
PACKAGE_DIRECTORY: "./choice_learn/" | |
PYTHON_VERSION: "3.8" | |
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
PUBLISH_REGISTRY_USER: ${{ secrets.PYPI_USERNAME }} |