Skip to content

Feature Release

Feature Release #25

Workflow file for this run

name: PyPI Publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
environment: NetBox DNS Deployment
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install latest version of Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Install deps
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build