Skip to content

Commit f2331e0

Browse files
committed
Simplify build file
1 parent 2b07c3e commit f2331e0

File tree

3 files changed

+36
-228
lines changed

3 files changed

+36
-228
lines changed

.github/workflows/python-client-release-pypi-artifact.yml renamed to .github/workflows/python-client-build-artifacts.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,29 @@
1717
# under the License.
1818
#
1919

20-
name: "Build Python Client Release PyPI Artifacts"
20+
name: "Python Client Build Artifacts"
2121

2222
on:
23+
workflow_dispatch:
24+
inputs:
25+
version:
26+
description: 'Version to set (optional, e.g. 1.1.0 or 1.1.0rc1 or dev-20251202-abc1234)'
27+
type: string
28+
required: false
2329
workflow_call:
2430
inputs:
25-
VERSION:
26-
required: true
31+
version:
32+
description: 'Version to set (optional)'
2733
type: string
34+
required: false
35+
pull_request:
36+
paths:
37+
- '.github/workflows/python-client-build-artifacts.yml'
38+
- 'client/python/**'
2839

2940
jobs:
30-
pypi-build-artifacts:
31-
name: Build artifacts for SVN on ${{ matrix.os }}
41+
build-artifacts:
42+
name: Build artifacts on ${{ matrix.os }}
3243
runs-on: ${{ matrix.os }}
3344
strategy:
3445
matrix:
@@ -53,9 +64,10 @@ jobs:
5364
distribution: 'temurin'
5465
java-version: '21'
5566

56-
- name: Set version with RC
67+
- name: Set version (if provided)
68+
if: inputs.version != ''
5769
env:
58-
VERSION: ${{ inputs.VERSION }}
70+
VERSION: ${{ inputs.version }}
5971
run: make client-set-version VERSION="${{ env.VERSION }}"
6072

6173
- name: Build source distribution
@@ -82,17 +94,29 @@ jobs:
8294

8395
- uses: actions/upload-artifact@v4
8496
with:
85-
name: "python-client-pypi-release-candidate-${{ matrix.os }}"
97+
name: "python-client-artifacts-${{ matrix.os }}"
8698
path: ./wheelhouse/*
8799

88-
pypi-merge-artifacts:
100+
merge-artifacts:
89101
runs-on: ubuntu-latest
90102
needs:
91-
- pypi-build-artifacts
103+
- build-artifacts
92104
steps:
105+
- name: Generate artifact name
106+
id: artifact-name
107+
run: |
108+
if [ -n "${{ inputs.version }}" ]; then
109+
ARTIFACT_NAME="python-client-artifacts-${{ inputs.version }}"
110+
else
111+
ARTIFACT_NAME="python-client-artifacts-${{ github.run_id }}"
112+
fi
113+
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
114+
echo "Using artifact name: $ARTIFACT_NAME"
115+
93116
- name: Merge Artifacts
94117
uses: actions/upload-artifact/merge@v4
95118
with:
96-
name: "python-client-pypi-release-candidate-${{ inputs.VERSION }}"
97-
pattern: python-client-pypi-release-candidate*
119+
name: ${{ steps.artifact-name.outputs.ARTIFACT_NAME }}
120+
pattern: python-client-artifacts-*
98121
delete-merged: true
122+

.github/workflows/python-client-release-svn-artifact.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

.github/workflows/python-release-build.yml

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)