diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index d62150b..a573609 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -1,5 +1,9 @@ name: Upload Package to PyPi +# the authorization is handled via trusted published, see https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/ on: + push: + branches: + - 'testpypi' workflow_run: workflows: [CI validation] branches: [master] @@ -8,15 +12,25 @@ on: permissions: contents: read - +# jobs: deploy: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 + - name: Version bump + uses: monperrus/pyproject-bump-pypi@main + with: + file_to_bump: "./pyproject.toml" + bump_type: "minor" + - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.x' + - run: pip install build + - run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + uses: pypa/gh-action-pypi-publish@release/v1.8 diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..a45ca40 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include *.json diff --git a/README.md b/README.md index 49e7834..db421e1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This repository contains a list of of HTTP user-agents used by robots, crawlers, and spiders as in single JSON file. +* NPM package: +* Go package: +* PyPi package: + ## Install ### Direct download diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d8b4dca --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "crawler-user-agents" +version = "0.1" + +authors = [ + { name="Martin Monperrus", email="martin.monperrus@gnieh.org" }, +] + +readme = "README.md" + +[tool.setuptools.packages.find] +where = [ "." ] +