From bdb76cdda4ac99247fc048dd1b10f19743d88b8c Mon Sep 17 00:00:00 2001 From: Piotr Przetacznik Date: Mon, 25 Dec 2023 21:58:23 +0100 Subject: [PATCH] chore: Add github workflow --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ MANIFEST.in | 2 +- pyproject.toml | 3 +++ setup.cfg | 3 ++- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 pyproject.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1ed07a5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: ksef-utils Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + name: Documentation + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['3.11'] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Deploy package + run: | + pip install twine wheel + python setup.py sdist bdist_wheel + twine upload dist/* --skip-existing + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this release: + - ${{ github.event.head_commit.message }} + draft: true + prerelease: false diff --git a/MANIFEST.in b/MANIFEST.in index b87be7f..75444ac 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -recursive-include resources * +recursive-include resources *.yaml include templates/InitSession.xml include templates/invoice_example.xml include MANIFEST.in diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..638dd9c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index 6532c09..8756f4f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,8 @@ name = ksef-utils version = file:VERSION author = Piotr Przetacznik author_email = "piotr.przetacznik+ksef@gmail.com", -long_description = file:README.md +long_description = file: README.md +long_description_content_type = text/markdown url = https://github.com/pprzetacznik/ksef-utils keywords = invoices