Skip to content

Commit 2aabfe6

Browse files
authored
ci: Don't bump Connector Builder to prerelease CDK versions (#109)
1 parent e1100ef commit 2aabfe6

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/pypi_publish.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ jobs:
115115
environment:
116116
name: PyPi
117117
url: https://pypi.org/p/airbyte-cdk/
118-
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && (github.event.inputs.publish_to_pypi == 'true' || github.event.inputs.update_connector_builder == 'true'))
118+
if: >
119+
(github.event_name == 'push' &&
120+
startsWith(github.ref, 'refs/tags/v')) ||
121+
(github.event_name == 'workflow_dispatch' &&
122+
(github.event.inputs.publish_to_pypi == 'true' ||
123+
github.event.inputs.update_connector_builder == 'true'
124+
))
119125
env:
120126
VERSION: ${{ needs.build.outputs.VERSION }}
121127
IS_PRERELEASE: ${{ needs.build.outputs.IS_PRERELEASE }}
@@ -136,7 +142,10 @@ jobs:
136142
file_glob: true
137143

138144
- name: Publish to PyPI
139-
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish_to_pypi == 'true'
145+
if: >
146+
(github.event_name == 'push' &&
147+
startsWith(github.ref, 'refs/tags/v')
148+
) || github.event.inputs.publish_to_pypi == 'true'
140149
uses: pypa/[email protected]
141150

142151
publish_sdm:
@@ -145,7 +154,10 @@ jobs:
145154
# (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
146155
# Until then, this workflow needs to be kicked off manually.
147156
# Last remaining blocker documented here: https://github.com/airbytehq/airbyte-python-cdk/issues/64
148-
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_dockerhub == 'true')
157+
if: >
158+
(github.event_name == 'workflow_dispatch' &&
159+
github.event.inputs.publish_to_dockerhub == 'true'
160+
)
149161
runs-on: ubuntu-latest
150162
needs: [build]
151163
environment:
@@ -231,10 +243,18 @@ jobs:
231243
# Create a PR against the Builder, to update the CDK version that it uses.
232244
# In the future, Builder may use the SDM docker image instead of the Python CDK package.
233245
name: Bump Connector Builder CDK version
246+
environment:
247+
name: Connector Builder
248+
url: https://github.com/airbytehq/airbyte-platform-internal/pulls?q=is%3Apr+automatic-cdk-release+
234249
needs:
235250
- build
236251
- publish_cdk
237-
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.update_connector_builder == 'true')
252+
if: >
253+
(github.event_name == 'push' &&
254+
needs.build.outputs.IS_PRERELEASE == 'false' &&
255+
startsWith(github.ref, 'refs/tags/v')) ||
256+
(github.event_name == 'workflow_dispatch' &&
257+
github.event.inputs.update_connector_builder == 'true')
238258
env:
239259
VERSION: ${{ needs.build.outputs.VERSION }}
240260
IS_PRERELEASE: ${{ needs.build.outputs.IS_PRERELEASE }}

0 commit comments

Comments
 (0)