s/beta/preview in bump-version.yml

(cherry picked from commit e735cced7af3e0aaf4ca656bdc55d5b2375d1fed)
This commit is contained in:
dsotirakis 2023-05-29 16:18:05 +03:00
parent e5a71e81aa
commit fb3f497f6e
No known key found for this signature in database
GPG Key ID: A102B2D49C025273

View File

@ -3,7 +3,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
version: version:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1' description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-preview<number> format. example: 7.4.3 or 7.4.3-preview1'
required: true required: true
env: env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false YARN_ENABLE_IMMUTABLE_INSTALLS: false
@ -17,26 +17,26 @@ jobs:
id: regex-match id: regex-match
with: with:
text: ${{ github.event.inputs.version }} text: ${{ github.event.inputs.version }}
regex: '^(\d+.\d+).\d+(?:-(?:(beta\d+)|(pre)))?$' regex: '^(\d+.\d+).\d+(?:-(?:(preview\d+)|(pre)))?$'
- uses: actions-ecosystem/action-regex-match@v2.0.2 - uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ inputs.version_call != '' }} if: ${{ inputs.version_call != '' }}
id: regex-match-version-call id: regex-match-version-call
with: with:
text: ${{ inputs.version_call }} text: ${{ inputs.version_call }}
regex: '^(\d+.\d+).\d+(?:-(?:(beta\d+)|(pre)))?$' regex: '^(\d+.\d+).\d+(?:-(?:(preview\d+)|(pre)))?$'
- name: Validate input version - name: Validate input version
if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }} if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }}
run: | run: |
echo "The input version format is not correct, please respect:\ echo "The input version format is not correct, please respect:\
major.minor.patch or major.minor.patch-beta.number format. \ major.minor.patch or major.minor.patch-preview.number format. \
example: 7.4.3 or 7.4.3-beta1" example: 7.4.3 or 7.4.3-preview1"
exit 1 exit 1
- name: Validate input version call - name: Validate input version call
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }} if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
run: | run: |
echo "The input version format is not correct, please respect:\ echo "The input version format is not correct, please respect:\
major.minor.patch or major.minor.patch-beta<number> format. \ major.minor.patch or major.minor.patch-preview<number> format. \
example: 7.4.3 or 7.4.3-beta1" example: 7.4.3 or 7.4.3-preview1"
exit 1 exit 1
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -68,7 +68,7 @@ jobs:
node-version: '16' node-version: '16'
- name: Install Actions - name: Install Actions
run: npm install --production --prefix ./actions run: npm install --production --prefix ./actions
- name: Run bump version (manually invoked) - name: Run bump version (manually invoked)
uses: ./actions/bump-version uses: ./actions/bump-version
with: with:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}