From 42caee86054252d8b2f1a8b5350944243feffa48 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 4 Nov 2024 19:12:05 +0100 Subject: [PATCH] Make EvaP pip-installable and publish to PyPI --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ .gitignore | 1 + pyproject.toml | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..11726eb98 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: EvaP Release + +on: + pull_request: + # release: + # types: [published] + +jobs: + pypi-publish: + name: upload release to PyPI + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - run: | + python3 -m venv venv + source venv/bin/activate + python -m pip install --upgrade build + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.gitignore b/.gitignore index d115f15ab..731af7cf6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ TAGS # python files *.py[cod] +dist/ # gettext binaries *.mo diff --git a/pyproject.toml b/pyproject.toml index 26cb455c4..ff38fcee8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [tool.poetry] -package-mode = false name = "evap" description = "EvaP" +authors = [ "EvaP Developers" ] +version = "2024.11.0" readme = "README.md" packages = [{include = "evap"}]