From 5c47c507ca53f5e20e9c5573b40952ad860dcb49 Mon Sep 17 00:00:00 2001 From: Vadim Nifadev <36514612+nifadyev@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:07:51 +0300 Subject: [PATCH 1/2] Update classifiers and package version --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ba3c5c3..115f2b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "toggl_python" -version = "0.2.9" +version = "0.3.0a0" description = "Python wrapper for Toggl API." authors = ["Evrone "] maintainers = ["Nifadev Vadim "] @@ -9,16 +9,19 @@ homepage = "https://github.com/evrone/toggl_python" repository = "https://github.com/evrone/toggl_python" documentation = "https://toggl-python.readthedocs.io" classifiers = [ - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", + "Operating System :: OS Independent", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Typing :: Typed", ] From 7b7ebea187fb0f705815aa661cae66d8c0d2bdfe Mon Sep 17 00:00:00 2001 From: Vadim Nifadev <36514612+nifadyev@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:08:10 +0300 Subject: [PATCH 2/2] Add Github Action to build and release on Test Pypi --- .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c80ec24 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +env: + PYTHON_VERSION: "3.8" + POETRY_CORE_VERSION: "1.9.0" + +jobs: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Build release distributions + run: | + python -m pip install build poetry-core==${{ env.POETRY_CORE_VERSION }} + python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + + needs: + - release-build + + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + environment: + name: test_pypi + url: https://test.pypi.org/p/toggl_python + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/