diff --git a/.forgejo/workflows/cd.yaml b/.forgejo/workflows/cd.yaml new file mode 100644 index 0000000..3690493 --- /dev/null +++ b/.forgejo/workflows/cd.yaml @@ -0,0 +1,25 @@ +name: CD + +on: + push: + tags: + - '*' +jobs: + ci: + runs-on: docker + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' + + - run: pip install -r requirements.txt + + - run: python3 -m build + + - run: twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} \ No newline at end of file diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index 5d335f3..677968d 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -14,4 +14,4 @@ jobs: - run: pip install -r requirements.txt - - run: pylint --max-line-length=120 app \ No newline at end of file + - run: pylint --max-line-length=120 pfsense_netbox_sync \ No newline at end of file diff --git a/app/__init__.py b/app/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/__main__.py b/pfsense_netbox_sync/__init__.py similarity index 100% rename from app/__main__.py rename to pfsense_netbox_sync/__init__.py diff --git a/pyproject.toml b/pyproject.toml index ba53bd7..6b39667 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,7 @@ [build-system] -requires = ["setuptools>=61.0"] +requires = [ + "setuptools>=61.0", +] build-backend = "setuptools.build_meta" [project] @@ -15,10 +17,17 @@ classifiers = [ "Programming Language :: Python :: 3", "Operating System :: OS Independent", ] - -[license] -file = 'LICENSE.txt' +dependencies = [ + "pynetbox>=7.4", + "requests>=2.32", +] [project.urls] Homepage = "https://git.creekorful.cloud/creekorful/pfsense-netbox-sync" -Issues = "https://git.creekorful.cloud/creekorful/pfsense-netbox-sync/issues" \ No newline at end of file +Issues = "https://git.creekorful.cloud/creekorful/pfsense-netbox-sync/issues" + +[project.scripts] +pfnbsync = "pfsense_netbox_sync:main" + +[license] +file = 'LICENSE.txt' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index f8b985c..0bff070 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pynetbox==7.4.1 requests==2.32.3 pylint==3.3.4 -build==1.2.2.post1 \ No newline at end of file +build==1.2.2.post1 +twine==6.1.0 \ No newline at end of file