Skip to content

Commit 070104d

Browse files
Enable manual package publish retry via workflow_dispatch in build workflow (#48)
* Add workflow_dispatch support for manual package publish Agent-Logs-Url: https://github.com/NetApp/recline/sessions/cea89f9e-4732-45b6-ac9a-7813acaa1648 Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com> * Gate manual publish behind workflow_dispatch input Agent-Logs-Url: https://github.com/NetApp/recline/sessions/cea89f9e-4732-45b6-ac9a-7813acaa1648 Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com> * Use boolean workflow_dispatch input for manual publish Agent-Logs-Url: https://github.com/NetApp/recline/sessions/cea89f9e-4732-45b6-ac9a-7813acaa1648 Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com> * Use event-safe publish condition for push tags and manual dispatch Agent-Logs-Url: https://github.com/NetApp/recline/sessions/cea89f9e-4732-45b6-ac9a-7813acaa1648 Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com>
1 parent 61c637f commit 070104d

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
name: build
2-
on: push
2+
on:
3+
push:
4+
workflow_dispatch:
5+
inputs:
6+
publish_package:
7+
description: "Publish package to PyPI"
8+
type: boolean
9+
required: true
10+
default: false
311
jobs:
412
build:
513
runs-on: ubuntu-latest
@@ -28,6 +36,5 @@ jobs:
2836
poetry run pytest --cov=recline --cov-report=xml tests
2937
poetry build
3038
- name: Publish Package
31-
if: startsWith(github.event.ref, 'refs/tags')
39+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch' && inputs.publish_package)
3240
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
33-

0 commit comments

Comments
 (0)