Skip to content

Merge pull request #11 from opsmill/wvd-20240507-update-infrahub-sdk #2

Merge pull request #11 from opsmill/wvd-20240507-update-infrahub-sdk

Merge pull request #11 from opsmill/wvd-20240507-update-infrahub-sdk #2

Workflow file for this run

---
name: Publish nornir_infrahub to PyPI
on: # yamllint disable rule:truthy
push:
tags:
- "v*"
jobs:
publish_to_pypi:
name: "Publish nornir_infrahub to PyPI"
runs-on: "ubuntu-22.04"
steps:
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install Poetry"
uses: "snok/install-poetry@v1"
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Cache poetry venv"
uses: "actions/cache@v3"
id: "cached-poetry-dependencies"
with:
path: ".venv"
key: "venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}"
- name: "Install Dependencies"
run: "poetry install"
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: "Add PyPI secret"
run: "poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}"
- name: "Poetry build"
run: "poetry build"
- name: "Poetry push PyPI"
run: "poetry publish"