Skip to content

Commit 6e50393

Browse files
committed
Build Python wheel in release-build, publish from artifact in release-publish
Move wheel build to a separate python-wheel job in release-build so it can be scanned alongside the Go binaries. The publish workflow downloads the pre-built wheel instead of building it. Co-authored-by: Isaac
1 parent dfa2980 commit 6e50393

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed

.github/workflows/release-build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,30 @@ jobs:
122122
files: |-
123123
dist/databricks_cli_*.zip
124124
dist/databricks_cli_*.tar.gz
125+
126+
python-wheel:
127+
runs-on:
128+
group: databricks-deco-testing-runner-group
129+
labels: ubuntu-latest-deco
130+
131+
steps:
132+
- name: Checkout repository
133+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
134+
with:
135+
fetch-depth: 0
136+
fetch-tags: true
137+
138+
- name: Install uv
139+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
140+
with:
141+
version: "0.6.5"
142+
143+
- name: Build wheel
144+
working-directory: python
145+
run: make build
146+
147+
- name: Upload Python wheel
148+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
149+
with:
150+
name: python-wheel
151+
path: python/dist/*

.github/workflows/release-publish.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -286,24 +286,18 @@ jobs:
286286
id-token: write
287287

288288
steps:
289-
- name: Checkout repository
290-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
291-
with:
292-
ref: ${{ inputs.tag }}
293-
294-
- name: Install uv
295-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
289+
- name: Download Python wheel
290+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
296291
with:
297-
version: "0.6.5"
298-
299-
- name: Build wheel
300-
working-directory: python
301-
run: make build
292+
name: python-wheel
293+
path: dist
294+
run-id: ${{ inputs.build_run_id }}
295+
github-token: ${{ secrets.GITHUB_TOKEN }}
302296

303297
- name: Publish package distributions to PyPI
304298
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
305299
with:
306-
packages-dir: python/dist
300+
packages-dir: dist
307301

308302
publish-to-winget-pkgs:
309303
if: ${{ !inputs.dry_run }}

0 commit comments

Comments
 (0)