From db8a3cde778def2736acbc33bb26a8b3f0ff3928 Mon Sep 17 00:00:00 2001 From: Ron Date: Sat, 24 Aug 2024 01:56:04 +0100 Subject: [PATCH] updating version to 0.1.3 --- .github/workflows/ci-cd.yml | 32 ++++++++++++++++++----------- pyproject.toml | 2 +- src/etekcity_esf551_ble/__init__.py | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c16175c..a3bc7fa 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,13 +5,18 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - contents: read strategy: matrix: python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -26,7 +31,9 @@ jobs: needs: build runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' + environment: release permissions: + id-token: write contents: read steps: - uses: actions/checkout@v4 @@ -41,11 +48,11 @@ jobs: - name: Build package run: python -m build - name: Publish to TestPyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} - run: | - twine upload --repository testpypi dist/* + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.TESTPYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ - name: Verify installation from TestPyPI run: | python -m venv test-env @@ -57,7 +64,9 @@ jobs: needs: [build, publish-test] runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' + environment: release permissions: + id-token: write contents: read steps: - uses: actions/checkout@v4 @@ -72,11 +81,10 @@ jobs: - name: Build package run: python -m build - name: Upload to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - twine upload dist/* + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} - name: Upload Release Assets uses: actions/upload-release-asset@v3 with: diff --git a/pyproject.toml b/pyproject.toml index b6ab84f..54f989d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "etekcity_esf551_ble" -version = "0.1.2" +version = "0.1.3" authors = [ { name="Ron", email="ronnnnnnn@gmail.com" }, ] diff --git a/src/etekcity_esf551_ble/__init__.py b/src/etekcity_esf551_ble/__init__.py index e493139..1fe95a1 100644 --- a/src/etekcity_esf551_ble/__init__.py +++ b/src/etekcity_esf551_ble/__init__.py @@ -8,4 +8,4 @@ "IMPEDANCE_KEY", "WEIGHT_KEY", ] -__version__ = "0.1.2" +__version__ = "0.1.3"