From bfec4f77f307591fc1f78328bbfaf78c7860a7ad Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Apr 2025 11:24:00 +0200 Subject: [PATCH 1/3] feat: Add github release automation --- .github/workflows/release.yaml | 51 +++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1046ea0..6e2611c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: persist-credentials: false - uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - name: Install the latest version of uv uses: astral-sh/setup-uv@v5 @@ -23,6 +23,27 @@ jobs: name: python-package-distributions path: dist/ + 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/ + publish-to-pypi: name: Publish dist to pypi runs-on: ubuntu-latest @@ -34,7 +55,6 @@ jobs: url: https://pypi.org/p/topen permissions: id-token: write - steps: - name: Grab dist files uses: actions/download-artifact@v4 @@ -44,24 +64,17 @@ jobs: - name: Send off to PyPi uses: pypa/gh-action-pypi-publish@release/v1 - publish-to-testpypi: - name: Test publishing to testpypi + create-release: + name: Create github release runs-on: ubuntu-latest - needs: - - build - environment: - name: testpypi - url: https://test.pypi.org/p/topen + if: startsWith(github.ref, 'refs/tags/') permissions: - id-token: write - + contents: write steps: - - name: Grab dist files - uses: actions/download-artifact@v4 + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 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/ + changelog: CHANGELOG.md + token: ${{ secrets.GITHUB_TOKEN }} + draft: true + branch: main From 11d35429c7b9184e2f6f6e17aa1f07ec3f3b91b0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Apr 2025 11:27:45 +0200 Subject: [PATCH 2/3] doc: Add initial version to CHANGELOG --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08090e9..af98f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,3 +20,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Create any necessary parent directories for notes directory. + +## [0.1.0] - 2025-04-01 + +### Added + +- Open task associated note files in specified editor +- Create command line interface for option setting +- Add license +- Take `taskrc` location as cli option +- Let user set `editor` or grab from `EDITOR`/`VISUAL` env vars From 6eb48bd1805f961865a8f4e03c72d1283acca812 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Apr 2025 11:33:31 +0200 Subject: [PATCH 3/3] chore: Ignore duplicate markdown headings on different levels Necessary for CHANGELOG to pass since every change contains something like 'Added', 'Fixed', 'Changed' as headings. Will still error if there are e.g. multiple 'Added' headings for a single version. --- .markdownlint.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..fba9b6e --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,5 @@ +{ + "no-duplicate-heading": { + "siblings_only": true + } +}