Skip to content

Commit a19b398

Browse files
authored
Merge pull request #2379 from DuendeSoftware/dh/allow-additional-prerelease-labels
Allow alpha and beta pre-release labels in release workflow version validation
2 parents 0b0d2e5 + e832177 commit a19b398

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

.github/workflow-gen/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void GenerateReleaseWorkflow(Product product)
246246

247247
job.Step()
248248
.Name("Validate Version Input")
249-
.Run($@"echo '{contexts.Event.Input.Version}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)");
249+
.Run($@"echo '{contexts.Event.Input.Version}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)");
250250

251251
job.StepGitCheckoutCustomBranch();
252252
job.StepGitConfig();

.github/workflow-gen/StepExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ git push origin {component.TagPrefix}-{contexts.Event.Input.Version}
195195

196196
public static WorkflowDispatch InputVersionBranchAndTagOverride(this WorkflowDispatch workflow) =>
197197
workflow.Inputs(
198-
new StringInput("version", "Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N", true, "0.0.0"),
198+
new StringInput("version", "Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N", true, "0.0.0"),
199199
new StringInput("branch", "(Optional) the name of the branch to release from", false, "main"),
200200
new BooleanInput("remove-tag-if-exists", "If set, will remove the existing tag. Use this if you have issues with the previous release action", false, false));
201201

.github/workflows/aspnetcore-authentication-jwtbearer-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141
- name: Validate Version Input
42-
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
42+
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)
4343
- name: Checkout target branch
4444
if: github.event.inputs.branch != 'main'
4545
run: git checkout ${{ github.event.inputs.branch }}

.github/workflows/bff-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141
- name: Validate Version Input
42-
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
42+
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)
4343
- name: Checkout target branch
4444
if: github.event.inputs.branch != 'main'
4545
run: git checkout ${{ github.event.inputs.branch }}

.github/workflows/conformance-report-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141
- name: Validate Version Input
42-
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
42+
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)
4343
- name: Checkout target branch
4444
if: github.event.inputs.branch != 'main'
4545
run: git checkout ${{ github.event.inputs.branch }}

.github/workflows/docs-mcp-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141
- name: Validate Version Input
42-
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
42+
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)
4343
- name: Checkout target branch
4444
if: github.event.inputs.branch != 'main'
4545
run: git checkout ${{ github.event.inputs.branch }}

.github/workflows/identity-server-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141
- name: Validate Version Input
42-
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
42+
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-(?:alpha|beta|preview|rc)\.\d+)?$' || (echo 'Invalid version format' && exit 1)
4343
- name: Checkout target branch
4444
if: github.event.inputs.branch != 'main'
4545
run: git checkout ${{ github.event.inputs.branch }}

.github/workflows/templates-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
version:
8-
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
8+
description: 'Version in format X.Y.Z or X.Y.Z-{alpha,beta,preview,rc}.N'
99
type: string
1010
required: true
1111
default: '0.0.0'

0 commit comments

Comments
 (0)