From b1816d5daec812e4563ef89d2b5a72cc7a0b1b1f Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Fri, 24 Apr 2026 15:45:36 +0200 Subject: [PATCH 1/4] PROE-5647: Speed up ps-agent builds - add ps-build-release workflow for prebuilt wheels --- .github/workflows/ps-build-release.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ps-build-release.yml diff --git a/.github/workflows/ps-build-release.yml b/.github/workflows/ps-build-release.yml new file mode 100644 index 0000000000..adc63bb35c --- /dev/null +++ b/.github/workflows/ps-build-release.yml @@ -0,0 +1,38 @@ +name: PS Build & Release + +on: + release: + types: + - published + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install build tools + run: python -m pip install --upgrade pip build + + - name: Build wheel + run: python -m build --wheel + + - name: Verify wheel + run: | + pip install --no-deps dist/*.whl + python -c "from mitmproxy.version import VERSION; print(f'Built version: {VERSION}')" + + - name: Upload wheel to release + uses: softprops/action-gh-release@v2 + with: + files: dist/*.whl From 895d98abdf58bb2e4ab8b2d0ba5f4c2c864496fa Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Fri, 24 Apr 2026 16:02:03 +0200 Subject: [PATCH 2/4] PROE-5647: Speed up ps-agent builds - bump version to 12.2.1+ps1 --- mitmproxy/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/version.py b/mitmproxy/version.py index dd0e6c45f8..2c2209df78 100644 --- a/mitmproxy/version.py +++ b/mitmproxy/version.py @@ -2,7 +2,7 @@ import subprocess import sys -VERSION = "12.2.1" +VERSION = "12.2.1+ps1" MITMPROXY = "mitmproxy " + VERSION # Serialization format version. This is displayed nowhere, it just needs to be incremented by one From 1f8a2b929c792d614ac050ad55d929ab19c04f52 Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Fri, 24 Apr 2026 17:21:43 +0200 Subject: [PATCH 3/4] PROE-5647: Speed up ps-agent builds - add release title/body and fail_on_unmatched_files --- .github/workflows/ps-build-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ps-build-release.yml b/.github/workflows/ps-build-release.yml index adc63bb35c..ac9253b024 100644 --- a/.github/workflows/ps-build-release.yml +++ b/.github/workflows/ps-build-release.yml @@ -35,4 +35,11 @@ jobs: - name: Upload wheel to release uses: softprops/action-gh-release@v2 with: + name: "mitmproxy ps fork ${{ github.ref_name }}" + body: | + Prompt Security patched build of mitmproxy. + Tag: `${{ github.ref_name }}` + Commit: `${{ github.sha }}` + Branch: `${{ github.event.release.target_commitish }}` + fail_on_unmatched_files: true files: dist/*.whl From 61d8df1f4d90bc85e5cd9559dab3d4bd270ec071 Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Tue, 28 Apr 2026 17:44:32 +0300 Subject: [PATCH 4/4] PROE-5647: Speed up ps-agent builds - add version-tag mismatch guard --- .github/workflows/ps-build-release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ps-build-release.yml b/.github/workflows/ps-build-release.yml index ac9253b024..63eb93e7f2 100644 --- a/.github/workflows/ps-build-release.yml +++ b/.github/workflows/ps-build-release.yml @@ -30,7 +30,17 @@ jobs: - name: Verify wheel run: | pip install --no-deps dist/*.whl - python -c "from mitmproxy.version import VERSION; print(f'Built version: {VERSION}')" + python -c " + import sys, os + from mitmproxy.version import VERSION + tag = os.environ['GITHUB_REF_NAME'] + expected = tag.split('ps-v')[1].rsplit('-',1)[0] + pkg_ver = VERSION.split('+')[0] + if pkg_ver != expected: + print(f'VERSION MISMATCH: wheel has {VERSION}, tag is {tag} (expected base version {expected})') + sys.exit(1) + print(f'Version OK: {VERSION} matches tag {tag}') + " - name: Upload wheel to release uses: softprops/action-gh-release@v2