diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..aba072d --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,35 @@ +name: Upload Python Package + +on: + push: + branches: [main] + tags: + - v* + pull_request: + branches: [main] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + + - name: Build + run: | + poetry self add "poetry-dynamic-versioning[plugin]" + rm -fr dist/ && poetry build + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }} diff --git a/README.md b/README.md index 0adacfd..3eaada6 100644 --- a/README.md +++ b/README.md @@ -412,4 +412,4 @@ step2 = ( .with_verbose() ) retult = step2.run() -``` \ No newline at end of file +``` diff --git a/pyproject.toml b/pyproject.toml index 32459e0..913717e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ name = "nmass" version = "0.1.0" description = "A python3 library that makes it easier to use nmap and masscan" authors = ["4shen0ne <4shen.01@gmail.com>"] +license = "MIT" readme = "README.md" [tool.poetry.dependencies] @@ -10,6 +11,9 @@ python = "^3.12" pydantic-xml = "^2.11.0" aiofiles = "^24.1.0" +[tool.poetry-dynamic-versioning] +enable = true + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"