Skip to content

Commit

Permalink
PyPi release script
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed May 18, 2024
1 parent 4eb41e6 commit ab38932
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include *.json
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://www.npmjs.com/package/crawler-user-agents>
* Go package: <https://pkg.go.dev/github.com/monperrus/crawler-user-agents>
* PyPi package: <https://pypi.org/project/crawler-user-agents/>

## Install

### Direct download
Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "crawler-user-agents"
version = "0.1"

authors = [
{ name="Martin Monperrus", email="[email protected]" },
]

readme = "README.md"

[tool.setuptools.packages.find]
where = [ "." ]

0 comments on commit ab38932

Please sign in to comment.