From 2f29054429f1bc234879a09641ce7f01d0f2d57a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 8 Apr 2025 21:01:35 +0200 Subject: [PATCH 1/3] doc: Remove leftover footnote --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4956bff..40aa1c9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Provide a taskwarrior task id or uuid and `topen` creates a new note file or let you edit an existing one. Additionally it adds a small annotation to the task to let you see that there exists a note file next time you view the task. -Should just work as-is without additional configuration in most modern taskwarrior setups.[^moderntw] +Should just work as-is without additional configuration in most modern taskwarrior setups. Can be configured through environment variables or cli options, see below. From 2fb0608a87dd7b4ca680d74e369d69a2c69d9bcf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Apr 2025 10:09:35 +0200 Subject: [PATCH 2/3] doc: Add README badges --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40aa1c9..2e0d1ea 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Simple taskwarrior note management -[Docs](https://marty-oehme.github.io/topen) -[Pypi](https://pypi.org/project/topen) +[![Static Badge](https://img.shields.io/badge/pdoc-Docs-blue)](https://marty-oehme.github.io/topen) +[![PyPI - Version](https://img.shields.io/pypi/v/topen)](https://pypi.org/project/topen) +[![GitHub Release](https://img.shields.io/github/v/release/marty-oehme/topen)](https://github.com/marty-oehme/topen/releases/latest) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/marty-oehme/topen/docs.yaml) A script without bells and whistles. Focuses on letting you quickly: From 771993f9993b614b1b78ce8201ff86bd2494465d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Apr 2025 10:35:19 +0200 Subject: [PATCH 3/3] feat: Add pypi auto publishing --- .github/workflows/docs.yaml | 2 +- .github/workflows/release.yaml | 67 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a32ee73..f211d21 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.x' - name: Install the latest version of uv uses: astral-sh/setup-uv@v5 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..1046ea0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,67 @@ +name: Publish python package to pypi and testpypi +on: push +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v5 + + - name: Build the wheel and source tarball + run: uv build + - name: Store dist packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: Publish dist to pypi + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + needs: + - build + environment: + name: pypi + url: https://pypi.org/p/topen + permissions: + id-token: write + + steps: + - name: Grab dist files + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Send off to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + + publish-to-testpypi: + name: Test publishing to testpypi + runs-on: ubuntu-latest + needs: + - build + environment: + name: testpypi + url: https://test.pypi.org/p/topen + permissions: + id-token: write + + steps: + - name: Grab dist files + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Send off to TestPyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/README.md b/README.md index 2e0d1ea..72b81f1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Static Badge](https://img.shields.io/badge/pdoc-Docs-blue)](https://marty-oehme.github.io/topen) [![PyPI - Version](https://img.shields.io/pypi/v/topen)](https://pypi.org/project/topen) [![GitHub Release](https://img.shields.io/github/v/release/marty-oehme/topen)](https://github.com/marty-oehme/topen/releases/latest) -![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/marty-oehme/topen/docs.yaml) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/marty-oehme/topen/release.yaml) A script without bells and whistles. Focuses on letting you quickly: