Skip to content

Commit a98f497

Browse files
committed
test python package --test --v 0.0.2
1 parent c664221 commit a98f497

11 files changed

Lines changed: 708 additions & 599 deletions

File tree

.github/workflows/publish_python.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
description: "force alpha/beta publish"
1111
required: false
1212
default: "false"
13+
custom_version:
14+
description: "custom version (e.g., 0.0.2)"
15+
required: false
16+
default: ""
1317
push:
1418
branches:
1519
- main
@@ -38,6 +42,7 @@ jobs:
3842
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
3943
echo "RELEASE_MODE=${{ inputs.mode }}" >> $GITHUB_ENV
4044
echo "FORCE_RELEASE=${{ inputs.force_release }}" >> $GITHUB_ENV
45+
echo "CUSTOM_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV
4146
else
4247
msg="${{ github.event.head_commit.message }}"
4348
if echo "$msg" | grep -q -- "--test"; then
@@ -54,10 +59,18 @@ jobs:
5459
else
5560
echo "FORCE_RELEASE=false" >> $GITHUB_ENV
5661
fi
62+
# Extract custom version from commit message (--v X.Y.Z)
63+
custom_ver=$(echo "$msg" | grep -oP '(?<=--v\s)\S+' || echo "")
64+
echo "CUSTOM_VERSION=$custom_ver" >> $GITHUB_ENV
5765
fi
5866
shell: bash
5967
- name: Resolve Release Meta
60-
run: python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" >> $GITHUB_ENV
68+
run: |
69+
if [ -n "${{ env.CUSTOM_VERSION }}" ]; then
70+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" --version "${{ env.CUSTOM_VERSION }}" >> $GITHUB_ENV
71+
else
72+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" >> $GITHUB_ENV
73+
fi
6174
- name: Set Version
6275
run: python libs/python/tools/version.py --set "${{ env.PY_VERSION }}"
6376
shell: bash
@@ -109,6 +122,7 @@ jobs:
109122
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
110123
echo "RELEASE_MODE=${{ inputs.mode }}" >> $GITHUB_ENV
111124
echo "FORCE_RELEASE=${{ inputs.force_release }}" >> $GITHUB_ENV
125+
echo "CUSTOM_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV
112126
else
113127
msg="${{ github.event.head_commit.message }}"
114128
if echo "$msg" | grep -q -- "--test"; then
@@ -125,10 +139,18 @@ jobs:
125139
else
126140
echo "FORCE_RELEASE=false" >> $GITHUB_ENV
127141
fi
142+
# Extract custom version from commit message (--v X.Y.Z)
143+
custom_ver=$(echo "$msg" | grep -oP '(?<=--v\s)\S+' || echo "")
144+
echo "CUSTOM_VERSION=$custom_ver" >> $GITHUB_ENV
128145
fi
129146
shell: bash
130147
- name: Resolve Release Meta
131-
run: python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" >> $GITHUB_ENV
148+
run: |
149+
if [ -n "${{ env.CUSTOM_VERSION }}" ]; then
150+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" --version "${{ env.CUSTOM_VERSION }}" >> $GITHUB_ENV
151+
else
152+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" >> $GITHUB_ENV
153+
fi
132154
- name: Set Tag Name
133155
run: |
134156
if [ "${{ env.RELEASE_MODE }}" = "test" ]; then
@@ -208,6 +230,7 @@ jobs:
208230
run: |
209231
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
210232
echo "RELEASE_MODE=${{ inputs.mode }}" >> $GITHUB_ENV
233+
echo "CUSTOM_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV
211234
else
212235
msg="${{ github.event.head_commit.message }}"
213236
if echo "$msg" | grep -q -- "--test"; then
@@ -219,10 +242,18 @@ jobs:
219242
else
220243
echo "RELEASE_MODE=release" >> $GITHUB_ENV
221244
fi
245+
# Extract custom version from commit message (--v X.Y.Z)
246+
custom_ver=$(echo "$msg" | grep -oP '(?<=--v\s)\S+' || echo "")
247+
echo "CUSTOM_VERSION=$custom_ver" >> $GITHUB_ENV
222248
fi
223249
shell: bash
224250
- name: Resolve Release Meta
225-
run: python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "false" >> $GITHUB_ENV
251+
run: |
252+
if [ -n "${{ env.CUSTOM_VERSION }}" ]; then
253+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "false" --version "${{ env.CUSTOM_VERSION }}" >> $GITHUB_ENV
254+
else
255+
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "false" >> $GITHUB_ENV
256+
fi
226257
shell: bash
227258
- name: Wait for Package Availability
228259
run: |
@@ -290,6 +321,7 @@ jobs:
290321
run: |
291322
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
292323
echo "RELEASE_MODE=${{ inputs.mode }}" >> $GITHUB_ENV
324+
echo "CUSTOM_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV
293325
else
294326
msg="${{ github.event.head_commit.message }}"
295327
if echo "$msg" | grep -q -- "--test"; then
@@ -301,6 +333,9 @@ jobs:
301333
else
302334
echo "RELEASE_MODE=release" >> $GITHUB_ENV
303335
fi
336+
# Extract custom version from commit message (--v X.Y.Z)
337+
custom_ver=$(echo "$msg" | grep -oP '(?<=--v\s)\S+' || echo "")
338+
echo "CUSTOM_VERSION=$custom_ver" >> $GITHUB_ENV
304339
fi
305340
shell: bash
306341
- name: Resolve Release Meta

libs/python/API_REFERENCE.md

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

0 commit comments

Comments
 (0)