Skip to content

Commit 352ec0b

Browse files
Switch to on-demand publishing to private PyPI (#233)
1 parent c69eb5d commit 352ec0b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build_and_test_library.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ name: 'CI'
22
# Update the paths once you have created a client library build
33
on:
44
workflow_dispatch:
5+
inputs:
6+
publish-to-private-pypi:
7+
description: Whether to publish the build to the private PyPI
8+
type: choice
9+
options:
10+
- 'true'
11+
- 'false'
12+
default: 'false'
513
push:
614
tags:
715
- "*"
@@ -89,7 +97,7 @@ jobs:
8997
name: "Publish"
9098
runs-on: ubuntu-latest
9199
needs: [build-library]
92-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main')
100+
if: (github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/main') && (inputs.publish-to-private-pypi == 'true')
93101
steps:
94102
- name: "Release to private PyPI"
95103
uses: ansys/actions/release-pypi-private@v7

0 commit comments

Comments
 (0)