From 6bf6d5b6f8928f7eaf0aec88afa76cd6f99f12fc Mon Sep 17 00:00:00 2001 From: Arthur Kim Date: Wed, 31 Jul 2024 20:20:13 +0900 Subject: [PATCH 1/4] Add wheel (#29) --- .github/workflows/wheels.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..ba73cf6 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,51 @@ +name: Build + +on: + push: + tags: + - v* + +jobs: + build_dist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build dist and wheel + run: pipx run build --sdist --wheel + + - uses: actions/upload-artifact@v4 + with: + name: cibw-dist + path: dist/* + + # upload_pypi: + # needs: [build_dist] + # runs-on: [self-hosted, linux, x64, cpu-only] + # environment: release + # permissions: + # id-token: write + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: cibw-* + # path: dist + # merge-multiple: true + + # - uses: pypa/gh-action-pypi-publish@release/v1 + + upload_release: + needs: [build_dist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: dist/* From 75686a6c6f78f39e4f2f7b61c12fe77bd2c0b5e8 Mon Sep 17 00:00:00 2001 From: Arthur Kim Date: Tue, 6 Aug 2024 18:54:48 +0900 Subject: [PATCH 2/4] Support Python 3.12 (#30) * Support Python 3.12 * Update ci.yml for Python 3.12 * Update ci.yml for cache --- .github/workflows/ci.yml | 29 +++++++++++++++++++++-------- requirements.txt | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d46237..ca427aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,20 +5,33 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.10", "3.9", "3.8"] + python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Get pip cache dir + id: pip-cache + run: | + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + - name: pip cache + uses: actions/cache@v3 + with: + path: | + ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip - name: Install dependencies + env: + UV_SYSTEM_PYTHON: true run: | - python -m pip install --upgrade pip - pip install black mypy - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi - pip install -e . + python -m pip install --upgrade pip uv + uv pip install black mypy + uv pip install -e . + if [ -f tests/requirements.txt ]; then uv pip install -r tests/requirements.txt; fi - name: Lint with black and mypy run: | black --check . diff --git a/requirements.txt b/requirements.txt index 2636849..e14ec8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pyyaml==6.0 +pyyaml==6.0.1 pytest pytest-cov From a1e6f036bb9cfbcd82b19c8f5e8d89aa389f3c74 Mon Sep 17 00:00:00 2001 From: Sumin Byeon Date: Wed, 31 Jul 2024 20:21:24 +0900 Subject: [PATCH 3/4] build: Update version --- hanja/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hanja/__init__.py b/hanja/__init__.py index 26aab65..36090f4 100644 --- a/hanja/__init__.py +++ b/hanja/__init__.py @@ -9,7 +9,7 @@ __all__ = ["is_hanja", "is_valid_mode", "split_hanja", "translate"] __author__ = "Sumin Byeon" __email__ = "suminb@gmail.com" -__version__ = "0.14.1" +__version__ = "0.15.0" # Copied from https://wiki.python.org/moin/PythonDecoratorLibrary From 2b3c9a38ce815de84abd47c4ffd6e9d7d762531e Mon Sep 17 00:00:00 2001 From: Sumin Byeon Date: Tue, 6 Aug 2024 19:26:46 +0900 Subject: [PATCH 4/4] build: Update version (v0.15.1) --- hanja/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hanja/__init__.py b/hanja/__init__.py index 36090f4..cefd346 100644 --- a/hanja/__init__.py +++ b/hanja/__init__.py @@ -9,7 +9,7 @@ __all__ = ["is_hanja", "is_valid_mode", "split_hanja", "translate"] __author__ = "Sumin Byeon" __email__ = "suminb@gmail.com" -__version__ = "0.15.0" +__version__ = "0.15.1" # Copied from https://wiki.python.org/moin/PythonDecoratorLibrary