From df2a9be018c112c33a3ffbde88498b7aa836915b Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Wed, 4 Dec 2024 08:50:43 -0500 Subject: [PATCH] release v1.0.1 --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++ README.rst | 5 +++ binary/__init__.py | 2 +- pyproject.toml | 4 +-- 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e2c20f8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +name: build + +on: + push: + tags: + - v* + branches: + - master + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + build: + name: Build artifacts + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install Hatch + uses: pypa/hatch@install + + - name: Build wheel and source distribution + run: hatch build + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: dist/* + if-no-files-found: error + + publish: + name: Publish to PyPI + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + needs: build + runs-on: ubuntu-latest + + permissions: + id-token: write + + steps: + - name: Download Python artifacts + uses: actions/download-artifact@v4 + with: + name: artifacts + path: dist + + - name: Push Python artifacts to PyPI + uses: pypa/gh-action-pypi-publish@v1.10.2 + with: + skip-existing: true diff --git a/README.rst b/README.rst index 60f17fc..e726aa0 100644 --- a/README.rst +++ b/README.rst @@ -163,6 +163,11 @@ Changelog Important changes are emphasized. +1.0.1 +^^^^^ + +- Fix syntax warning on newer versions of Python + 1.0.0 ^^^^^ diff --git a/binary/__init__.py b/binary/__init__.py index 578c058..fd86113 100644 --- a/binary/__init__.py +++ b/binary/__init__.py @@ -23,4 +23,4 @@ "YOBIBYTE", "YOTTABYTE", "BinaryUnits", "DecimalUnits", "convert_units", ] -__version__ = '1.0.0' +__version__ = '1.0.1' diff --git a/pyproject.toml b/pyproject.toml index 32f71ed..4f53e90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] @@ -31,7 +31,7 @@ classifiers = [ Homepage = "https://github.com/ofek/binary" [tool.hatch.version] -path = "binary/__init__.py" +source = "vcs" [tool.hatch.build.targets.sdist] include = [