From 461496fbcb424cafbd983bfdeeba041a420eb444 Mon Sep 17 00:00:00 2001 From: Petr Tsymbarovich Date: Thu, 20 Aug 2026 13:06:46 +0300 Subject: [PATCH 1/2] chore: bump version to 0.2.0 --- targets/ptfkit-native/cmake/ptfkitVersion.cmake | 2 +- targets/ptfkit-py/src/ptfkit/_version.py | 2 +- targets/ptfkit-rs/Cargo.lock | 2 +- targets/ptfkit-rs/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/ptfkit-native/cmake/ptfkitVersion.cmake b/targets/ptfkit-native/cmake/ptfkitVersion.cmake index f9613cd..dce83b8 100644 --- a/targets/ptfkit-native/cmake/ptfkitVersion.cmake +++ b/targets/ptfkit-native/cmake/ptfkitVersion.cmake @@ -1,2 +1,2 @@ # @generated by ptfkit-codegen; do not edit. -set(PTFKIT_VERSION "0.1.0") +set(PTFKIT_VERSION "0.2.0") diff --git a/targets/ptfkit-py/src/ptfkit/_version.py b/targets/ptfkit-py/src/ptfkit/_version.py index 88fc255..93df43f 100644 --- a/targets/ptfkit-py/src/ptfkit/_version.py +++ b/targets/ptfkit-py/src/ptfkit/_version.py @@ -1,2 +1,2 @@ # @generated by ptfkit-codegen; do not edit. -__version__ = '0.1.0' +__version__ = '0.2.0' diff --git a/targets/ptfkit-rs/Cargo.lock b/targets/ptfkit-rs/Cargo.lock index 6ec893f..0b128f3 100644 --- a/targets/ptfkit-rs/Cargo.lock +++ b/targets/ptfkit-rs/Cargo.lock @@ -29,7 +29,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "ptfkit" -version = "0.1.0" +version = "0.2.0" dependencies = [ "assertables", ] diff --git a/targets/ptfkit-rs/Cargo.toml b/targets/ptfkit-rs/Cargo.toml index 76e4faa..609ebfd 100644 --- a/targets/ptfkit-rs/Cargo.toml +++ b/targets/ptfkit-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ptfkit" -version = "0.1.0" +version = "0.2.0" edition = "2024" description = "Pedotransfer functions for estimating soil hydraulic properties" license = "MIT" From 18c33a06a4c178070c2728e150dbca45b07e166d Mon Sep 17 00:00:00 2001 From: Petr Tsymbarovich Date: Thu, 20 Aug 2026 13:30:50 +0300 Subject: [PATCH 2/2] ci: fix pypi publishing Add a temporal workflow_dispatch for manual publish. --- .github/workflows/release.yaml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a765ec0..f8875ba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,6 +3,12 @@ name: Publish release on: release: types: [published] + workflow_dispatch: + inputs: + tag: + description: Existing release tag whose Python package should be republished + required: true + type: string permissions: contents: read @@ -14,15 +20,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Check target versions - run: python .github/scripts/check-version.py "${{ github.event.release.tag_name }}" + run: python .github/scripts/check-version.py "${{ github.event.release.tag_name || inputs.tag }}" make-sdist: name: Make Python sdist + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' needs: check-version runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} - uses: astral-sh/setup-uv@v10.0.1 - name: Build sdist run: uv build --directory targets/ptfkit-py --sdist @@ -33,6 +44,7 @@ jobs: build-wheels: name: Build Python wheels on ${{ matrix.os }} + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' needs: check-version runs-on: ${{ matrix.runs-on }} strategy: @@ -50,20 +62,23 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v7 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Build wheels uses: pypa/cibuildwheel@v4.2.0 with: - package-dir: targets/ptfkit-py/dist + package-dir: targets/ptfkit-py output-dir: targets/ptfkit-py/dist/wheelhouse env: CIBW_BUILD_FRONTEND: uv - uses: actions/upload-artifact@v7 with: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} - path: targets/ptfkit-py/wheelhouse/*.whl + path: targets/ptfkit-py/dist/wheelhouse/*.whl publish-pypi: name: Publish to PyPI + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' needs: [make-sdist, build-wheels] runs-on: ubuntu-latest environment: @@ -84,6 +99,7 @@ jobs: publish-crates: name: Publish to crates.io + if: github.event_name == 'release' needs: check-version runs-on: ubuntu-latest environment: @@ -93,6 +109,8 @@ jobs: id-token: write steps: - uses: actions/checkout@v7 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Authenticate to crates.io with trusted publishing id: auth uses: rust-lang/crates-io-auth-action@v1 @@ -107,6 +125,7 @@ jobs: publish-native: name: Publish native source archive + if: github.event_name == 'release' needs: check-version runs-on: ubuntu-latest permissions: @@ -115,9 +134,11 @@ jobs: attestations: write steps: - uses: actions/checkout@v7 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Create native archive env: - TAG: ${{ github.event.release.tag_name }} + TAG: ${{ github.event.release.tag_name || inputs.tag }} run: | version="${TAG#v}" archive="ptfkit-native-${version}.tar.gz" @@ -133,4 +154,4 @@ jobs: - name: Upload native archive to GitHub Release env: GH_TOKEN: ${{ github.token }} - run: gh release upload "${{ github.event.release.tag_name }}" "$archive" "$archive.sha256" --clobber + run: gh release upload "${{ github.event.release.tag_name || inputs.tag }}" "$archive" "$archive.sha256" --clobber