-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (36 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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