Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ps-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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 "
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
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
2 changes: 1 addition & 1 deletion mitmproxy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading