Skip to content

Commit 4a8dbe7

Browse files
author
Peter Baumert
committed
fix: publish to PyPI on release_created, add workflow_dispatch, add v0.2.0 to COMPATIBILITY.md
1 parent 51a2324 commit 4a8dbe7

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
permissions:
1212
contents: write
1313
pull-requests: write
14+
id-token: write
1415

1516
jobs:
1617
release-please:
@@ -42,3 +43,23 @@ jobs:
4243
git add COMPATIBILITY.md
4344
git diff --cached --quiet || git commit -m "chore: add ${VERSION} to COMPATIBILITY.md"
4445
git push
46+
47+
- name: Check out repo for PyPI publish
48+
if: ${{ steps.release.outputs.release_created }}
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Python
52+
if: ${{ steps.release.outputs.release_created }}
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: "3.12"
56+
57+
- name: Build package
58+
if: ${{ steps.release.outputs.release_created }}
59+
run: |
60+
pip install build
61+
python -m build
62+
63+
- name: Publish to PyPI
64+
if: ${{ steps.release.outputs.release_created }}
65+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Publish to PyPI
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
permissions:
89
id-token: write

COMPATIBILITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Plugin version | NetBox version | Python | Notes |
66
|----------------|---------------|--------|-------|
7+
| 0.2.0 | 4.5.x | 3.12+ | Tested |
78
| 0.1.15 | 4.5.x | 3.12+ | Tested |
89
| 0.1.x | 3.5+ | 3.10+ | Minimum supported (dcim migration 0172) |
910

0 commit comments

Comments
 (0)