25
25
version :
26
26
description : ' Version'
27
27
type : string
28
- default : ' main'
28
+ rc :
29
+ description : ' RC'
30
+ type : string
29
31
30
32
31
33
jobs :
34
+ validate-inputs :
35
+ runs-on : ubuntu-latest
36
+ steps :
37
+ - name : Validate Version and RC
38
+ id : validate
39
+ run : |
40
+ # Validate version (e.g., 1.0.0)
41
+ if [[ ! "${{ github.event.inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
42
+ echo "Error: version must be in the format number.number.number"
43
+ exit 1
44
+ fi
45
+
46
+ # Validate rc (e.g., rc1)
47
+ if [[ ! "${{ github.event.inputs.rc }}" =~ ^rc[0-9]+$ ]]; then
48
+ echo "Error: rc must be in the format rc<number>"
49
+ exit 1
50
+
51
+ - name : Release Version
52
+ run : |
53
+ echo "Running Release Version: ${{ github.event.inputs.version }}${{ github.event.inputs.rc }}"
54
+
32
55
build_svn_artifacts :
33
56
name : Build artifacts for SVN on ${{ matrix.os }}
34
57
runs-on : ${{ matrix.os }}
@@ -134,7 +157,7 @@ jobs:
134
157
run : pip install poetry
135
158
136
159
- name : Set version
137
- run : python -m poetry version "${{ inputs.version }}" # CHANGE TO current TAG
160
+ run : python -m poetry version "${{ github.event. inputs.version }}${{ github.event.inputs.rc }}" # CHANGE TO current TAG
138
161
139
162
# Publish the source distribution with the version that's in
140
163
# the repository, otherwise the tests will fail
@@ -176,7 +199,7 @@ jobs:
176
199
- name : Merge Artifacts
177
200
uses : actions/upload-artifact/merge@v4
178
201
with :
179
- name : " release-svn-${{ github.event.inputs.version }}"
202
+ name : " release-svn-${{ github.event.inputs.version }}${{ github.event.inputs.rc }} "
180
203
pattern : release-svn*
181
204
delete-merged : true
182
205
@@ -187,6 +210,6 @@ jobs:
187
210
- name : Merge Artifacts
188
211
uses : actions/upload-artifact/merge@v4
189
212
with :
190
- name : " release-pypi-${{ github.event.inputs.version }}"
213
+ name : " release-pypi-${{ github.event.inputs.version }}${{ github.event.inputs.rc }} "
191
214
pattern : release-pypi*
192
215
delete-merged : true
0 commit comments