Feature Release #25
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: 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 |