From 4636ed4eca262a59f3e10d8405c343ff06b63fe5 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Wed, 20 Aug 2025 19:08:32 +0200 Subject: [PATCH 1/2] Upd changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da91815..f18d46f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # ptflops versions log +## v 0.7.5 +- Fix hook for nn.ConvTranspose2d + ## v 0.7.4 - Fix hook for nn.functional.interpolate. - Add ignore and custom modules for aten. From 9543a6811a6536034830096692bc1bc5cf6fd530 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Wed, 20 Aug 2025 19:09:20 +0200 Subject: [PATCH 2/2] Add publishing workflow --- .github/workflows/publish.yaml | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..e2a9e86 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,67 @@ +name: Build and upload to PyPI + +on: + workflow_dispatch: # run on request (no need for PR) + release: + types: [published] + +permissions: {} # No permissions by default on workflow level + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - name: Set up Python 3.10 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: "3.10" + - name: Install pypa/build + run: | + python -m pip install --upgrade build + - name: Build sdist + run: | + python -m build --sdist ./ + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: artifact-sdist + path: dist/*.tar.gz + - name: Build wheel + run: | + python -m build --wheel ./ + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: artifact-wheel + path: dist/*.whl + + publish_package: + name: Publish package + needs: [build] + environment: pypi + runs-on: ubuntu-latest + permissions: + contents: write # required by svenstaro/upload-release-action + id-token: write # required by trusted publisher + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: distr + pattern: artifact-* + merge-multiple: true + - name: Upload package distributions to github + uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: distr/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 + with: + packages-dir: distr/