Skip to content

Commit

Permalink
validation for publish type
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Gołębiowski committed Nov 18, 2024
1 parent f068858 commit f7f2561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/actions/next-version-gen/generateVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ param(
$previewInfix
)

if($publishType -ne "Preview" -and $publishType -ne "Release") {
Write-Host "::error::Publish type can only be 'Preview' or 'Release'"
exit 1
}

$isPreview = $publishType -eq "Preview"

$pattern = "(?<Product>\w+)-v(?<Major>\d+)\.(?<Minor>\d+)\.(?<Patch>\w+)"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish

on:
push:
branches: [tg/worflow-for-release]
workflow_dispatch:
inputs:
publish:
Expand Down

0 comments on commit f7f2561

Please sign in to comment.