Skip to content

Commit

Permalink
add publishing to filecheck-ng package on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed Jul 3, 2024
1 parent 970cdfe commit 1364a47
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Upload to PyPI

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
environment: publishing
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# clone repo and set up python
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# install build package and build dist
- name: Build distribution
run: >-
python3 -m pip install poetry &&
poetry build
# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion filecheck/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Parser(Iterator[CheckOp]):
comment_line_regexp: re.Pattern[str]

line_no: int = field(default=0)
line: str = field(default=0)
line: str = field(default="")

@classmethod
def from_opts(cls, opts: Options):
Expand Down
Empty file added filecheck/py.typed
Empty file.
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
[tool.poetry]
name = "filecheck"
name = "filecheck-ng"
version = "0.1.0"
description = "A Python-native clone of LLVMs FileCheck tool"
authors = ["Anton Lydike <me@antonlydike.de>"]
license = "GPLv3"
license = "GPL-3.0-or-later"
readme = "README.md"
homepage = "https://github.com/AntonLydike/filecheck"
repository = "https://github.com/AntonLydike/filecheck"
keywords = ["tests", "filecheck", "llvm"]
packages = [
{ include = "filecheck" },
{ include = "filecheck/py.typed" },
]

[tool.poetry.dependencies]
python = "^3.10"
Expand Down

0 comments on commit 1364a47

Please sign in to comment.