Skip to content

Commit f1a7d79

Browse files
author
Latence AI
committed
ci: allow same-version PyPI wheel refresh
Add a manual publish path that emits a build-tagged wheel without changing the SDK package version.
1 parent d873506 commit f1a7d79

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish to PyPI
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
wheel_build_tag:
9+
description: "Optional same-version wheel build tag, e.g. 1 for latence-0.1.2-1-py3-none-any.whl"
10+
required: false
11+
default: ""
612

713
jobs:
814
publish:
@@ -29,6 +35,12 @@ jobs:
2935
- name: Build package
3036
run: python -m build
3137

38+
- name: Retag wheel for same-version refresh
39+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.wheel_build_tag != '' }}
40+
run: |
41+
pip install wheel
42+
python -m wheel tags --remove --build "${{ inputs.wheel_build_tag }}" dist/*.whl
43+
3244
- name: Publish to PyPI
3345
uses: pypa/gh-action-pypi-publish@release/v1
3446
with:

0 commit comments

Comments
 (0)