Merge pull request #10121 from cli/jtmcg/add-tagname-enforcement-to-deployment-workflow
Add job to deployment workflow to validate the tag name for a given release
This commit is contained in:
commit
7fcb4453ed
1 changed files with 12 additions and 0 deletions
12
.github/workflows/deployment.yml
vendored
12
.github/workflows/deployment.yml
vendored
|
|
@ -28,7 +28,17 @@ on:
|
|||
default: true
|
||||
|
||||
jobs:
|
||||
validate-tag-name:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Validate tag name format
|
||||
run: |
|
||||
if [[ ! "${{ inputs.tag_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$]]; then
|
||||
echo "Invalid tag name format. Must be in the form v1.2.3"
|
||||
exit 1
|
||||
fi
|
||||
linux:
|
||||
needs: validate-tag-name
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ inputs.environment }}
|
||||
if: contains(inputs.platforms, 'linux')
|
||||
|
|
@ -63,6 +73,7 @@ jobs:
|
|||
dist/*.deb
|
||||
|
||||
macos:
|
||||
needs: validate-tag-name
|
||||
runs-on: macos-latest
|
||||
environment: ${{ inputs.environment }}
|
||||
if: contains(inputs.platforms, 'macos')
|
||||
|
|
@ -134,6 +145,7 @@ jobs:
|
|||
dist/*.pkg
|
||||
|
||||
windows:
|
||||
needs: validate-tag-name
|
||||
runs-on: windows-latest
|
||||
environment: ${{ inputs.environment }}
|
||||
if: contains(inputs.platforms, 'windows')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue