Skip to content

Publish Package

Publish Package #11

Workflow file for this run

name: Publish Package
on:
workflow_run:
workflows: ["Check formatting and run tests"]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
MY_TEST: ${{ secrets.TEST }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - # Install Poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH # Add Poetry to the PATH
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
- name: Publish to PyPI
run: |
echo The value of MY_TEST is: $MY_TEST
poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI
echo "Added token"
poetry build
poetry publish --build -vv